protected boolean doHandShake(byte endpointType, int queueSize) {
    try {
      handshake.handshakeWithClient(theSocket.getOutputStream(), theSocket.getInputStream(),
          endpointType, queueSize, communicationMode, principal);
    } catch (IOException ioe) {
      if (!crHelper.isShutdown() && !isTerminated()) {
        logger.warn("{}: Handshake accept failed on socket {}: {}", name, theSocket, ioe);
      }
      cleanup();
      return false;
    }
    return true;
  }
Creates a new {@code ServerConnection} that processes messages received from an edge
client over a given {@code Socket}.
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnection.java