Module: SocksTunnel::Local::Server
- Defined in:
- lib/socks_tunnel/local.rb
Instance Method Summary collapse
Instance Method Details
#post_init ⇒ Object
41 42 43 44 45 46 |
# File 'lib/socks_tunnel/local.rb', line 41 def post_init @fiber = Fiber.new do greeting loop { do_command } end end |
#receive_data(data) ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/socks_tunnel/local.rb', line 48 def receive_data(data) if @connection @connection.send_encoded_data(data.to_s) else @data = data @fiber = nil if @fiber.resume end end |
#unbind ⇒ Object
57 58 59 |
# File 'lib/socks_tunnel/local.rb', line 57 def unbind @connection.close_connection if @connection end |