Class: Qpid::Proton::Listener
- Inherits:
-
Object
- Object
- Qpid::Proton::Listener
- Defined in:
- lib/core/listener.rb
Overview
A listener for incoming connections.
Create with Container#listen or Container#listen_io. To control the handler and connection options applied to incoming connections, pass a ListenerHandler on creation.
Direct Known Subclasses
Defined Under Namespace
Classes: Handler
Instance Attribute Summary collapse
-
#condition ⇒ Condition
readonly
The error condition if there is one.
-
#container ⇒ Container
readonly
The listener’s container.
Instance Method Summary collapse
-
#close(error = nil) ⇒ Object
Close the listener.
-
#to_io ⇒ Object
Get the IO server socket used by the listener.
Instance Attribute Details
#condition ⇒ Condition (readonly)
Returns The error condition if there is one.
61 62 63 |
# File 'lib/core/listener.rb', line 61 def condition @condition end |
#container ⇒ Container (readonly)
Returns The listener’s container.
58 59 60 |
# File 'lib/core/listener.rb', line 58 def container @container end |
Instance Method Details
#close(error = nil) ⇒ Object
Close the listener
65 66 67 68 69 70 |
# File 'lib/core/listener.rb', line 65 def close(error=nil) @closing = true @condition ||= Condition.convert error @io.close_read rescue nil # Cause listener to wake out of IO.select nil end |
#to_io ⇒ Object
Get the IO server socket used by the listener
73 |
# File 'lib/core/listener.rb', line 73 def to_io() @io; end |