docs: protected Address readPeerAddress(Socket client_sock) throws Exception {
          int timeout=client_sock.getSoTimeout();
          client_sock.setSoTimeout(server.peerAddressReadTimeout());
  
          try {
              // read the cookie first
              byte[] input_cookie=new byte[cookie.length];
              in.readFully(input_cookie, 0, input_cookie.length);
              if(!Arrays.equals(cookie, input_cookie))
                  throw new SocketException(String.format("%s: BaseServer.TcpConnection.readPeerAddress(): cookie sent by " +
                                                            "%s:%d does not match own cookie; terminating connection",
                                                          server.localAddress(), client_sock.getInetAddress(), client_sock.getPort()));
              // then read the version
              short version=in.readShort();
              if(!Version.isBinaryCompatible(version))
                  throw new IOException("packet from " + client_sock.getInetAddress() + ":" + client_sock.getPort() +
                                          " has different version (" + Version.print(version) +
                                          ") from ours (" + Version.printVersion() + "); discarding it");
              in.readShort(); // address length is only needed by NioConnection
  
              Address client_peer_addr=new IpAddress();
              client_peer_addr.readFrom(in);
              updateLastAccessed();
              return client_peer_addr;
          }
          finally {
              client_sock.setSoTimeout(timeout);
          }
      }