class Listener
Represents a network listener socket with its queue statistics.
Nested
Definitions
def to_json(*arguments)
Convert the object to a JSON string.
Implementation
def to_json(*arguments)
as_json.to_json(*arguments)
end
def self.zero
Create a zero-initialized Listener instance.
Signature
-
returns
Listener A new Listener object with all fields set to zero.
Implementation
def self.zero
self.new(0, 0)
end
def self.supported?
Whether listener stats can be captured on this system.
Implementation
def self.supported?
false
end
def self.capture(**options)
Capture listener stats for the given address(es).
Signature
-
parameter
addressesArray(String) | Nil TCP address(es) to capture, e.g. ["0.0.0.0:80"]. If nil, captures all listening TCP sockets.
-
parameter
pathsArray(String) | Nil Unix socket path(s) to capture. If nil and addresses is nil, captures all. If nil but addresses specified, captures none.
-
returns
Hash(String, Listener) | Nil A hash mapping addresses/paths to Listener, or nil if not supported.
Implementation
def self.capture(**options)
return nil
end