Class: Shadowsocks::Tunnel

Inherits:
Connection
  • Object
show all
Defined in:
lib/shadowsocks/tunnel.rb

Constant Summary

Constants inherited from Connection

Connection::BackpressureLevel

Instance Attribute Summary collapse

Attributes inherited from Connection

#crypto

Instance Method Summary collapse

Constructor Details

#initialize(server, crypto) ⇒ Tunnel

Returns a new instance of Tunnel.



5
6
7
8
9
# File 'lib/shadowsocks/tunnel.rb', line 5

def initialize server, crypto
  @server = server
  @crypto = crypto
  super
end

Instance Attribute Details

#serverObject

Returns the value of attribute server.



3
4
5
# File 'lib/shadowsocks/tunnel.rb', line 3

def server
  @server
end

Instance Method Details

#remoteObject



15
16
17
# File 'lib/shadowsocks/tunnel.rb', line 15

def remote
  server
end

#unbindObject



11
12
13
# File 'lib/shadowsocks/tunnel.rb', line 11

def unbind
  server.close_connection_after_writing
end