Class: Raindrops::ListenStats
Overview
Used to represent the number of active and queued sockets for
a single listen socket across all threads and processes on a
machine.
For TCP listeners, only sockets in the TCP_ESTABLISHED state are accounted for. For Unix domain listeners, only CONNECTING and CONNECTED Unix domain sockets are accounted for.
active connections is the number of accept()-ed but not-yet-closed
sockets in all threads/processes sharing the given listener.
queued connections is the number of un-accept()-ed sockets in the
queue of a given listen socket.
These stats are currently only available under Linux
Instance Attribute Summary collapse
-
#active ⇒ Object
Returns the value of attribute active.
-
#queued ⇒ Object
Returns the value of attribute queued.
Instance Method Summary collapse
-
#total ⇒ Object
the sum of
activeandqueuedsockets.
Methods inherited from Struct
Instance Attribute Details
#active ⇒ Object
Returns the value of attribute active
33 34 35 |
# File 'lib/raindrops.rb', line 33 def active @active end |
#queued ⇒ Object
Returns the value of attribute queued
33 34 35 |
# File 'lib/raindrops.rb', line 33 def queued @queued end |
Instance Method Details
#total ⇒ Object
the sum of active and queued sockets
36 37 38 |
# File 'lib/raindrops.rb', line 36 def total active + queued end |