Class: ShadowsocksRuby::Protocols::PlainProtocol::TCP::Destination

Inherits:
Object
  • Object
show all
Defined in:
lib/shadowsocks_ruby/protocols/packet/plain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Destination

Returns a new instance of Destination.

Parameters:

  • params (Hash) (defaults to: {})

    Configuration parameters


11
12
13
# File 'lib/shadowsocks_ruby/protocols/packet/plain.rb', line 11

def initialize params = {}
  @params = {}.merge(params)
end

Instance Attribute Details

#next_protocolObject

Returns the value of attribute next_protocol


8
9
10
# File 'lib/shadowsocks_ruby/protocols/packet/plain.rb', line 8

def next_protocol
  @next_protocol
end

Instance Method Details

#async_recv(n) ⇒ Object


15
16
17
# File 'lib/shadowsocks_ruby/protocols/packet/plain.rb', line 15

def async_recv n
  @next_protocol.async_recv n
end

#send_data(data) ⇒ Object


19
20
21
# File 'lib/shadowsocks_ruby/protocols/packet/plain.rb', line 19

def send_data data
  @next_protocol.send_data data
end