Class: Shadowsocks::Local::DirectConnector
Constant Summary
Constants inherited
from Connection
Connection::BackpressureLevel
Instance Attribute Summary
Attributes inherited from Tunnel
#server
Attributes inherited from Connection
#crypto
Instance Method Summary
collapse
Methods inherited from Tunnel
#initialize, #remote, #unbind
Instance Method Details
#post_init ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/shadowsocks/local.rb', line 22
def post_init
p "connecting #{server.remote_addr[3..-1]} directly"
server.cached_pieces.each { |piece| send_data piece }
server.cached_pieces = []
server.stage = 5
end
|
#receive_data(data) ⇒ Object
30
31
32
33
|
# File 'lib/shadowsocks/local.rb', line 30
def receive_data data
server.send_data data
outbound_scheduler
end
|