# File lib/em-socksify/socksify.rb, line 4 def socksify(host, port, username = nil, password = nil, version = 5, &blk) @socks_target_host = host @socks_target_port = port @socks_username = username @socks_password = password @socks_version = version @socks_data = '' socks_hook socks_send_handshake @socks_deferrable = DefaultDeferrable.new @socks_deferrable.callback(&blk) if blk @socks_deferrable end