Sha256: 4a00371ed9da82e0f5463536b68d2535055f8e06090188172b30386028b35b88

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

# -*- encoding: binary -*-
class Raindrops

  # Raindrops is currently at version 0.1.0
  VERSION = '0.1.0'

  # 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
  class ListenStats < Struct.new(:active, :queued)

    # the sum of +active+ and +queued+ sockets
    def total
      active + queued
    end
  end

  # TODO: pure Ruby version for single processes
  require 'raindrops_ext'

  autoload :Struct, 'raindrops/struct'
  autoload :Middleware, 'raindrops/middleware'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
raindrops-0.1.0 lib/raindrops.rb