infinipool/ezk — pull request #5 by epatey (2012-02-22 03:04:44+00:00)
Title: Fixed connection request and response data layouts in ezk_connection:establish_connection

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.