1 # -*- encoding: binary -*-
3 # Each Raindrops object is a container that holds several counters.
4 # It is internally a page-aligned, shared memory area that allows
5 # atomic increments, decrements, assignments and reads without any
10 # rd.to_ary -> [ 1, 0, 0, 0 ]
12 # Unlike many classes in this package, the core Raindrops class is
13 # intended to be portable to all reasonably modern *nix systems
14 # supporting mmap(). Please let us know if you have portability
15 # issues, patches or pull requests at mailto:raindrops-public@bogomips.org
18 # Used to represent the number of +active+ and +queued+ sockets for
19 # a single listen socket across all threads and processes on a
22 # For TCP listeners, only sockets in the TCP_ESTABLISHED state are
23 # accounted for. For Unix domain listeners, only CONNECTING and
24 # CONNECTED Unix domain sockets are accounted for.
26 # +active+ connections is the number of accept()-ed but not-yet-closed
27 # sockets in all threads/processes sharing the given listener.
29 # +queued+ connections is the number of un-accept()-ed sockets in the
30 # queue of a given listen socket.
32 # These stats are currently only available under \Linux
33 class ListenStats < Struct.new(:active, :queued)
35 # the sum of +active+ and +queued+ sockets
41 autoload :Linux, 'raindrops/linux'
42 autoload :Struct, 'raindrops/struct'
43 autoload :Middleware, 'raindrops/middleware'
44 autoload :Aggregate, 'raindrops/aggregate'
45 autoload :LastDataRecv, 'raindrops/last_data_recv'
46 autoload :Watcher, 'raindrops/watcher'
48 require 'raindrops_ext'