code: private IoBuffer encodeInitialGreetingPacket(final SocksProxyRequest request) {
          byte nbMethods = (byte) SocksProxyConstants.SUPPORTED_AUTH_METHODS.length;
          IoBuffer buf = IoBuffer.allocate(2 + nbMethods);
  
          buf.put(request.getProtocolVersion());
          buf.put(nbMethods);
          buf.put(SocksProxyConstants.SUPPORTED_AUTH_METHODS);
  
          return buf;
      }
docs: Encodes the initial greeting packet.
  
  @param request the socks proxy request data
  @return the encoded buffer