Class: EventMachine::Protocols::ServerConnection
- Inherits:
-
Connection
- Object
- Connection
- EventMachine::Protocols::ServerConnection
- Defined in:
- lib/proxymachine/server_connection.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(conn) ⇒ ServerConnection
constructor
A new instance of ServerConnection.
- #post_init ⇒ Object
- #unbind ⇒ Object
Constructor Details
#initialize(conn) ⇒ ServerConnection
Returns a new instance of ServerConnection.
8 9 10 |
# File 'lib/proxymachine/server_connection.rb', line 8 def initialize(conn) @client_side = conn end |
Class Method Details
.request(host, port, client_side) ⇒ Object
4 5 6 |
# File 'lib/proxymachine/server_connection.rb', line 4 def self.request(host, port, client_side) EventMachine.connect(host, port, self, client_side) end |
Instance Method Details
#post_init ⇒ Object
12 13 14 |
# File 'lib/proxymachine/server_connection.rb', line 12 def post_init proxy_incoming_to @client_side end |
#unbind ⇒ Object
16 17 18 |
# File 'lib/proxymachine/server_connection.rb', line 16 def unbind @client_side.close_connection_after_writing end |