module ShadowsocksRuby::Connections::UDP::ClientConnection
(see TCP::ClientConnection
)
Public Class Methods
new(protocol_stack, params, backend_protocol_stack, backend_params)
click to toggle source
(see TCP::ClientConnection#initialize)
Calls superclass method
ShadowsocksRuby::Connections::ServerConnection::new
# File lib/shadowsocks_ruby/connections/udp/client_connection.rb, line 19 def initialize protocol_stack, params, backend_protocol_stack, backend_params super end
Public Instance Methods
process_first_packet()
click to toggle source
# File lib/shadowsocks_ruby/connections/udp/client_connection.rb, line 23 def process_first_packet address_bin = packet_protocol.udp_receive_from_client(-1) create_plexer(@params[:host], @params[:port], RemoteServerConnection) plexer.packet_protocol.udp_send_to_remoteserver address_bin class << self alias process_hook process_other_packet end end
Also aliased as: process_hook
process_other_packet()
click to toggle source
# File lib/shadowsocks_ruby/connections/udp/client_connection.rb, line 35 def process_other_packet data = packet_protocol.udp_receive_from_client(-1) plexer.packet_protocol.udp_send_to_remoteserver(data) end