Class: Nonnative::FaultInjectionProxy::Connection
- Inherits:
-
Object
- Object
- Nonnative::FaultInjectionProxy::Connection
- Defined in:
- lib/nonnative/fault_injection_proxy.rb
Instance Attribute Summary collapse
-
#pair ⇒ Object
Returns the value of attribute pair.
-
#socket ⇒ Object
readonly
Returns the value of attribute socket.
-
#thread ⇒ Object
Returns the value of attribute thread.
Instance Method Summary collapse
- #close_sockets ⇒ Object
-
#initialize(socket) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(socket) ⇒ Connection
Returns a new instance of Connection.
63 64 65 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 63 def initialize(socket) @socket = socket end |
Instance Attribute Details
#pair ⇒ Object
Returns the value of attribute pair.
60 61 62 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 60 def pair @pair end |
#socket ⇒ Object (readonly)
Returns the value of attribute socket.
61 62 63 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 61 def socket @socket end |
#thread ⇒ Object
Returns the value of attribute thread.
60 61 62 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 60 def thread @thread end |
Instance Method Details
#close_sockets ⇒ Object
67 68 69 70 |
# File 'lib/nonnative/fault_injection_proxy.rb', line 67 def close_sockets pair&.close socket.close unless socket.closed? end |