Class: Thin::SwiftiplyConnection
- Inherits:
-
Connection
- Object
- EventMachine::Connection
- Connection
- Thin::SwiftiplyConnection
- Defined in:
- lib/thin/backends/swiftiply_client.rb
Constant Summary
Constants inherited from Connection
Connection::AsyncResponse, Connection::CHUNKED_REGEXP, Connection::CONTENT_LENGTH, Connection::TRANSFER_ENCODING
Instance Attribute Summary
Attributes inherited from Connection
#app, #backend, #request, #response, #threaded
Instance Method Summary collapse
Methods inherited from Connection
#can_persist!, #can_persist?, #close_request_response, #handle_error, #post_init, #post_process, #pre_process, #process, #receive_data, #remote_address, #terminate_request, #threaded?
Methods included from Logging
#debug, debug, debug?, #log, log, #log_error, log_error, #silent, #silent=, silent?, #trace, trace, trace?
Instance Method Details
#connection_completed ⇒ Object
33 34 35 |
# File 'lib/thin/backends/swiftiply_client.rb', line 33 def connection_completed send_data swiftiply_handshake(@backend.key) end |
#persistent? ⇒ Boolean
37 38 39 |
# File 'lib/thin/backends/swiftiply_client.rb', line 37 def persistent? true end |
#unbind ⇒ Object
41 42 43 44 |
# File 'lib/thin/backends/swiftiply_client.rb', line 41 def unbind super EventMachine.add_timer(rand(2)) { reconnect(@backend.host, @backend.port) } if @backend.running? end |