Class: Rev::Socket
Direct Known Subclasses
Defined Under Namespace
Classes: Connector
Constant Summary
Constants inherited from IO
Class Method Summary collapse
Instance Method Summary collapse
- #attach(evloop) ⇒ Object
-
#on_connect ⇒ Object
Called upon completion of a socket connection.
-
#on_connect_failed ⇒ Object
Called if a socket connection failed to complete.
-
#on_resolve_failed ⇒ Object
Called if a hostname failed to resolve when connecting Defaults to calling on_connect_failed.
Methods inherited from IO
#attached?, #close, #closed?, #detach, #disable, #enable, #enabled?, #evloop, #initialize, #on_close, #on_read, #on_write_complete, #output_buffer_size, #write
Methods included from Meta
#event_callback, #watcher_delegate
Constructor Details
This class inherits a constructor from Rev::IO
Class Method Details
Instance Method Details
#attach(evloop) ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/rev/socket.rb', line 22 def attach(evloop) raise RuntimeError, "connection failed" if @_failed if @_connector @_connector.attach(evloop) return self end super end |
#on_connect ⇒ Object
Called upon completion of a socket connection
34 |
# File 'lib/rev/socket.rb', line 34 def on_connect; end |
#on_connect_failed ⇒ Object
Called if a socket connection failed to complete
38 |
# File 'lib/rev/socket.rb', line 38 def on_connect_failed; end |
#on_resolve_failed ⇒ Object
Called if a hostname failed to resolve when connecting Defaults to calling on_connect_failed
43 44 45 |
# File 'lib/rev/socket.rb', line 43 def on_resolve_failed on_connect_failed end |