Behaviours: gen_server.
Authors: Oscar Hellström (oscar@hellstrom.st), Filipe David Manana (fdmanana@apache.org).
connection_count/0
and connection_count/1
.
The gen_server is supposed to be started by a supervisor, which is
normally lhttpc_sup
.
client_count/1 | Returns the total number of active clients maintained by the specified lhttpc pool (manager). |
client_done/5 | A client has finished one request and returns the socket to the pool, which can be new or not. |
connection_count/1 | Returns the total number of active connections maintained by the specified lhttpc pool (manager). |
connection_count/2 | Returns the number of active connections to the specific
Destination maintained by the httpc manager. |
dump_settings/1 | Returns the current settings in state for the specified lhttpc pool (manager). |
ensure_call/6 | If call contains pool_ensure option, dynamically create the pool with configured parameters. |
list_pools/0 | Lists all the pools already started. |
set_max_pool_size/2 | Sets the maximum pool size for the specified pool. |
start_link/0 | Starts and link to the gen server. |
start_link/1 | Starts and link to the gen server (with options). |
update_connection_timeout/2 | Updates the timeout for persistent connections. |
client_count(PidOrName::lhttpc:pool_id()) -> non_neg_integer()
Returns the total number of active clients maintained by the specified lhttpc pool (manager).
client_done(Pool::pid(), Host::lhttpc:host(), Port::lhttpc:port_num(), Ssl::boolean(), Socket::lhttpc:socket()) -> ok
A client has finished one request and returns the socket to the pool, which can be new or not.
connection_count(PidOrName::lhttpc:pool_id()) -> non_neg_integer()
Returns the total number of active connections maintained by the specified lhttpc pool (manager).
connection_count(PidOrName::lhttpc:pool_id(), X2::lhttpc:destination()) -> non_neg_integer()
Returns the number of active connections to the specific
Destination
maintained by the httpc manager.
dump_settings(PidOrName::lhttpc:pool_id()) -> list()
Returns the current settings in state for the specified lhttpc pool (manager).
ensure_call(Pool::lhttpc:pool_id(), Pid::pid(), Host::lhttpc:host(), Port::lhttpc:port_num(), Ssl::boolean(), Options::lhttpc:options()) -> lhttpc:socket() | no_socket
If call contains pool_ensure option, dynamically create the pool with configured parameters. Checks the pool for a socket connected to the destination and returns it if it exists, 'undefined' otherwise.
list_pools() -> term()
Lists all the pools already started.
set_max_pool_size(PidOrName::lhttpc:pool_id(), Size::non_neg_integer()) -> ok
Sets the maximum pool size for the specified pool.
start_link() -> {ok, pid()} | {error, already_started}
Starts and link to the gen server. This is normally called by a supervisor.
start_link(Options0::[{atom(), non_neg_integer()}]) -> {ok, pid()} | {error, already_started}
Starts and link to the gen server (with options). This is normally called by a supervisor.
update_connection_timeout(PidOrName::lhttpc:pool_id(), Milliseconds::non_neg_integer()) -> ok
Updates the timeout for persistent connections. This will only affect future sockets handed to the manager. The sockets already managed will keep their timers.
Generated by EDoc