infinipool/ezk — pull request #7 by epatey (2012-02-22 18:48:41+00:00)
Title: Fixed connection request and response data layouts.

The HandshakePacket does not match the data layout that Zookeeper is expecting.

Here's what I think Zookeeper is expecting (from ConnectRequest.java in the Zookeeper source):

```java
public class ConnectRequest implements Record {
private int protocolVersion;
private long lastZxidSeen;
private int timeOut;
private long sessionId;
private byte[] passwd;
...
```

Yet, this is what ezk is sending:
```HandshakePacket = <<0:64, WantedTimeout:64, 0:64, 16:64, 0:128>>
```

These don't match. In order to match what Zookeeper expects, it should look like:
```HandshakePacket = <<0:32, 0:64, WantedTimeout:32, 0:64, 16:32, 0:128>>
```

Without this fix, my Zookeeper 3.4.3 fails the connect request because it catches an end of stream exception.