Class: CapProxy::RemoteConnection
- Inherits:
-
EM::Connection
- Object
- EM::Connection
- CapProxy::RemoteConnection
- Defined in:
- lib/cap_proxy/remote_connection.rb
Instance Attribute Summary collapse
-
#proxy_connection ⇒ Object
readonly
Returns the value of attribute proxy_connection.
Instance Method Summary collapse
-
#initialize(proxy_connection) ⇒ RemoteConnection
constructor
A new instance of RemoteConnection.
- #receive_data(data) ⇒ Object
- #unbind ⇒ Object
Constructor Details
#initialize(proxy_connection) ⇒ RemoteConnection
Returns a new instance of RemoteConnection.
7 8 9 |
# File 'lib/cap_proxy/remote_connection.rb', line 7 def initialize(proxy_connection) @proxy_connection = proxy_connection end |
Instance Attribute Details
#proxy_connection ⇒ Object (readonly)
Returns the value of attribute proxy_connection.
5 6 7 |
# File 'lib/cap_proxy/remote_connection.rb', line 5 def proxy_connection @proxy_connection end |
Instance Method Details
#receive_data(data) ⇒ Object
11 12 13 14 15 |
# File 'lib/cap_proxy/remote_connection.rb', line 11 def receive_data(data) log = proxy_connection.server.log log.debug("Closing #{proxy_connection.head}") if log proxy_connection.send_data data end |
#unbind ⇒ Object
17 18 19 |
# File 'lib/cap_proxy/remote_connection.rb', line 17 def unbind proxy_connection.close_connection_after_writing end |