Class: Auger::Socket
- Inherits:
-
Connection
- Object
- Connection
- Auger::Socket
- Defined in:
- lib/auger/plugin/socket.rb
Instance Attribute Summary
Attributes inherited from Connection
#connection, #gateway, #options, #requests, #response, #roles
Instance Method Summary collapse
Methods inherited from Connection
#initialize, load, #method_missing, #timeout, #try_close, #try_open, #try_open_direct, #try_open_tunnel
Constructor Details
This class inherits a constructor from Auger::Connection
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Auger::Connection
Instance Method Details
#close(socket) ⇒ Object
15 16 17 |
# File 'lib/auger/plugin/socket.rb', line 15 def close(socket) socket.close if socket end |
#open(host, options) ⇒ Object
11 12 13 |
# File 'lib/auger/plugin/socket.rb', line 11 def open(host, ) TCPSocket.open(host, [:port]) rescue false end |
#open?(&block) ⇒ Boolean
19 20 21 |
# File 'lib/auger/plugin/socket.rb', line 19 def open?(&block) @requests << SocketRequest.load(nil, &block) end |