1 # -*- encoding: binary -*-
4 # Used to represent the number of +active+ and +queued+ sockets for
5 # a single listen socket across all threads and processes on a
8 # For TCP listeners, only sockets in the TCP_ESTABLISHED state are
9 # accounted for. For Unix domain listeners, only CONNECTING and
10 # CONNECTED Unix domain sockets are accounted for.
12 # +active+ connections is the number of accept()-ed but not-yet-closed
13 # sockets in all threads/processes sharing the given listener.
15 # +queued+ connections is the number of un-accept()-ed sockets in the
16 # queue of a given listen socket.
18 # These stats are currently only available under Linux
19 class ListenStats < Struct.new(:active, :queued)
21 # the sum of +active+ and +queued+ sockets
27 # TODO: pure Ruby version for single processes
28 require 'raindrops_ext'
30 autoload :Struct, 'raindrops/struct'
31 autoload :Middleware, 'raindrops/middleware'