class ShadowsocksRuby::Protocols::PlainProtocol
Relay data from peer to plexer without any process. This is a packet protocol, so no need to implement @buffer
Attributes
next_protocol[RW]
Public Class Methods
new(params = {})
click to toggle source
@param [Hash] configuration parameters
# File lib/shadowsocks_ruby/protocols/packet/plain.rb, line 11 def initialize params = {} @params = {}.merge(params) end
Public Instance Methods
tcp_receive_from_destination(n)
click to toggle source
# File lib/shadowsocks_ruby/protocols/packet/plain.rb, line 15 def tcp_receive_from_destination n async_recv n end
tcp_send_to_destination(data)
click to toggle source
# File lib/shadowsocks_ruby/protocols/packet/plain.rb, line 19 def tcp_send_to_destination data send_data data end
udp_receive_from_destination(n)
click to toggle source
# File lib/shadowsocks_ruby/protocols/packet/plain.rb, line 23 def udp_receive_from_destination n async_recv n end
udp_send_to_destination(data)
click to toggle source
# File lib/shadowsocks_ruby/protocols/packet/plain.rb, line 27 def udp_send_to_destination data send_data data end