Class: Shadowsocks::Server::RequestConnector
- Inherits:
-
Tunnel
- Object
- EventMachine::Connection
- Connection
- Tunnel
- Shadowsocks::Server::RequestConnector
- Defined in:
- lib/shadowsocks/server.rb
Constant Summary
Constants inherited from Connection
Instance Attribute Summary
Attributes inherited from Tunnel
Instance Method Summary collapse
Methods inherited from Tunnel
#encrypt, #initialize, #remote, #unbind
Constructor Details
This class inherits a constructor from Shadowsocks::Tunnel
Instance Method Details
#post_init ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/shadowsocks/server.rb', line 4 def post_init p "connecting #{server.remote_addr} via #{server.config.server}" server.cached_pieces.each { |piece| send_data piece } server.cached_pieces = nil server.stage = 5 end |
#receive_data(data) ⇒ Object
13 14 15 16 |
# File 'lib/shadowsocks/server.rb', line 13 def receive_data data server.send_data encrypt(table[:encrypt_table], data) outbound_checker end |