Module ranch_listener

Public API for managing listeners.

Behaviours: gen_server.

Description

Public API for managing listeners.

Function Index

add_connection/2Add a connection to the listener's pool.
get_max_connections/1Return the max number of connections allowed concurrently.
get_port/1Return the listener's port.
get_protocol_options/1Return the current protocol options.
remove_connection/1Remove this process' connection from the pool.
set_max_connections/2Set the max number of connections allowed concurrently.
set_protocol_options/2Upgrade the protocol options.

Function Details

add_connection/2

add_connection(ServerPid::pid(), ConnPid::pid()) -> non_neg_integer()

Add a connection to the listener's pool.

get_max_connections/1

get_max_connections(ServerPid::pid()) -> {ok, ranch:max_conns()}

Return the max number of connections allowed concurrently.

get_port/1

get_port(ServerPid::pid()) -> {ok, inet:port_number()}

Return the listener's port.

get_protocol_options/1

get_protocol_options(ServerPid::pid()) -> {ok, any()}

Return the current protocol options.

remove_connection/1

remove_connection(ServerPid::pid()) -> non_neg_integer()

Remove this process' connection from the pool.

Useful if you have long-lived connections that aren't taking up resources and shouldn't be counted in the limited number of running connections.

set_max_connections/2

set_max_connections(ServerPid::pid(), MaxConnections::ranch:max_conns()) -> ok

Set the max number of connections allowed concurrently.

set_protocol_options/2

set_protocol_options(ServerPid::pid(), ProtoOpts::any()) -> ok

Upgrade the protocol options.


Generated by EDoc, Aug 3 2013, 11:17:12.