Class: ScripTTY::Net::EventLoop::OutgoingConnectionWrapper
- Inherits:
-
ConnectionWrapper
- Object
- SocketChannelWrapper
- ConnectionWrapper
- ScripTTY::Net::EventLoop::OutgoingConnectionWrapper
- Defined in:
- lib/scriptty/net/event_loop.rb
Instance Attribute Summary
Attributes inherited from ConnectionWrapper
Instance Method Summary collapse
-
#initialize(master, channel, address) ⇒ OutgoingConnectionWrapper
constructor
A new instance of OutgoingConnectionWrapper.
- #on_connect(&callback) ⇒ Object
- #on_connect_error(&callback) ⇒ Object
Methods inherited from ConnectionWrapper
#close, #on_callback_error, #on_receive_bytes, #remote_address, #write
Methods inherited from SocketChannelWrapper
#close, #local_address, #on_close
Constructor Details
#initialize(master, channel, address) ⇒ OutgoingConnectionWrapper
Returns a new instance of OutgoingConnectionWrapper.
587 588 589 590 |
# File 'lib/scriptty/net/event_loop.rb', line 587 def initialize(master, channel, address) @address = address super(master, channel) end |
Instance Method Details
#on_connect(&callback) ⇒ Object
592 593 594 595 |
# File 'lib/scriptty/net/event_loop.rb', line 592 def on_connect(&callback) @master.send(:set_on_connect_callback, @channel, &callback) self end |
#on_connect_error(&callback) ⇒ Object
597 598 599 600 |
# File 'lib/scriptty/net/event_loop.rb', line 597 def on_connect_error(&callback) @master.send(:set_on_connect_error_callback, @channel, &callback) self end |