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