Module: TestProxyConnection::ProxyConnection
- Defined in:
- lib/ext/eventmachine-0.12.10/tests/test_proxy_connection.rb
Instance Method Summary collapse
- #connection_completed ⇒ Object
- #initialize(client, request) ⇒ Object
- #post_init ⇒ Object
- #proxy_target_unbound ⇒ Object
- #unbind ⇒ Object
Instance Method Details
#connection_completed ⇒ Object
16 17 18 19 20 |
# File 'lib/ext/eventmachine-0.12.10/tests/test_proxy_connection.rb', line 16 def connection_completed EM.next_tick { send_data @request } end |
#initialize(client, request) ⇒ Object
8 9 10 |
# File 'lib/ext/eventmachine-0.12.10/tests/test_proxy_connection.rb', line 8 def initialize(client, request) @client, @request = client, request end |
#post_init ⇒ Object
12 13 14 |
# File 'lib/ext/eventmachine-0.12.10/tests/test_proxy_connection.rb', line 12 def post_init EM::enable_proxy(self, @client) end |
#proxy_target_unbound ⇒ Object
22 23 24 25 |
# File 'lib/ext/eventmachine-0.12.10/tests/test_proxy_connection.rb', line 22 def proxy_target_unbound $unbound_early = true EM.stop end |
#unbind ⇒ Object
27 28 29 |
# File 'lib/ext/eventmachine-0.12.10/tests/test_proxy_connection.rb', line 27 def unbind @client.close_connection_after_writing end |