try {
// read the cookie first
byte[] input_cookie=new byte[cookie.length];
in.read(input_cookie, 0, input_cookie.length);
if(!matchCookie(input_cookie))
throw new SocketException("ConnectionTable.Connection.readPeerAddress(): cookie read by " + getLocalAddress()
+ " does not match own cookie; terminating connection");
// then read the version
short version=in.readShort();
if(!Version.isBinaryCompatible(version) ) {