code: public void setHandshakeType(byte handshakeType) {
          if (log.isTraceEnabled()) {
              if (handshakeType < HANDSHAKE_TYPES.length) {
                  log.trace("Setting handshake type: {}", HANDSHAKE_TYPES[handshakeType]);
              } else {
                  log.trace("Invalid handshake type: {}", handshakeType);
              }
          }
          this.handshakeType = handshakeType;
      }
docs: Sets the handshake type. Currently only two types are supported, plain and encrypted.
  
  @param handshakeType handshake type