Class: TransocksEM::TransocksClient
- Inherits:
-
EM::P::Socks4
- Object
- EM::P::Socks4
- TransocksEM::TransocksClient
- Defined in:
- lib/transocks_em.rb
Instance Attribute Summary collapse
-
#closed ⇒ Object
Returns the value of attribute closed.
Instance Method Summary collapse
-
#initialize(proxied, host, port) ⇒ TransocksClient
constructor
A new instance of TransocksClient.
- #proxy_target_unbound ⇒ Object
- #receive_data(data) ⇒ Object
- #unbind ⇒ Object
Constructor Details
#initialize(proxied, host, port) ⇒ TransocksClient
Returns a new instance of TransocksClient.
38 39 40 41 |
# File 'lib/transocks_em.rb', line 38 def initialize(proxied, host, port) @proxied = proxied super(host, port) end |
Instance Attribute Details
#closed ⇒ Object
Returns the value of attribute closed.
36 37 38 |
# File 'lib/transocks_em.rb', line 36 def closed @closed end |
Instance Method Details
#proxy_target_unbound ⇒ Object
48 49 50 |
# File 'lib/transocks_em.rb', line 48 def proxy_target_unbound close_connection end |
#receive_data(data) ⇒ Object
43 44 45 46 |
# File 'lib/transocks_em.rb', line 43 def receive_data(data) @proxied.send_data(data) proxy_incoming_to @proxied unless @proxied.closed end |
#unbind ⇒ Object
52 53 54 55 |
# File 'lib/transocks_em.rb', line 52 def unbind self.closed = true @proxied.close_connection_after_writing end |