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 ; }
Encodes the initial greeting packet .