Class: Thin::Backends::TcpServerWithCallbacks
- Inherits:
-
TcpServer
- Object
- TcpServer
- Thin::Backends::TcpServerWithCallbacks
- Defined in:
- lib/thin/backends/tcp_server_with_callbacks.rb
Instance Method Summary collapse
- #connect ⇒ Object
- #disconnect ⇒ Object
-
#initialize(host, port, options) ⇒ TcpServerWithCallbacks
constructor
A new instance of TcpServerWithCallbacks.
Constructor Details
#initialize(host, port, options) ⇒ TcpServerWithCallbacks
Returns a new instance of TcpServerWithCallbacks.
4 5 6 |
# File 'lib/thin/backends/tcp_server_with_callbacks.rb', line 4 def initialize(host, port, ) super(host, port) end |
Instance Method Details
#connect ⇒ Object
8 9 10 11 |
# File 'lib/thin/backends/tcp_server_with_callbacks.rb', line 8 def connect super Thin::Callbacks.after_connect_callbacks.each { |callback| callback.call } end |
#disconnect ⇒ Object
13 14 15 16 |
# File 'lib/thin/backends/tcp_server_with_callbacks.rb', line 13 def disconnect Thin::Callbacks.before_disconnect_callbacks.each { |callback| callback.call } super end |