# File lib/em-socksify/socks5.rb, line 5 def socks_send_handshake # Method Negotiation as described on # http://www.faqs.org/rfcs/rfc1928.html Section 3 @socks_state = :method_negotiation socks_methods.tap do |methods| send_data [5, methods.size].pack('CC') + methods.pack('C*') end end