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.
host() = string() | {integer(), integer(), integer(), integer()}
invalid_option() = any()
option() = {connect_timeout, timeout()} | {send_retry, non_neg_integer()} | {partial_upload, non_neg_integer() | infinity} | {partial_download, [partial_download_option()]} | {connect_options, socket_options()} | {proxy, string()} | {proxy_ssl_options, socket_options()} | {pool, pid() | atom()} | invalid_option()
options() = [option()]
partial_download_option() = {window_size, window_size()} | {part_size, non_neg_integer() | infinity} | invalid_option()
pool_id() = pid() | atom()
port_num() = 1..65535
socket() = term()
socket_options() = [{atom(), term()} | atom()]
window_size() = non_neg_integer() | infinity
| 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 | |
| update_connection_timeout/2 | Updates the timeout for persistent connections. |
client_count(PidOrName::PoolPidOrName) -> Count
Returns the total number of active clients maintained by the specified lhttpc pool (manager).
client_done(Pool::pid(), Host::host(), Port::port_num(), Ssl::boolean(), Socket::socket()) -> ok
A client has finished one request and returns the socket to the pool, which can be new or not.
connection_count(PidOrName::PoolPidOrName) -> Count
Returns the total number of active connections maintained by the specified lhttpc pool (manager).
connection_count(PidOrName::PoolPidOrName, X2::Destination) -> Count
Returns the number of active connections to the specific
Destination maintained by the httpc manager.
dump_settings(PidOrName::PoolPidOrName) -> list()
Returns the current settings in state for the specified lhttpc pool (manager).
ensure_call(Pool::pool_id(), Pid::pid(), Host::host(), Port::port_num(), Ssl::boolean(), Options::options()) -> 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::pool_id(), Size::non_neg_integer()) -> ok
Sets the maximum pool size for the specified pool.
start_link() -> {ok, pid()}
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}
update_connection_timeout(PidOrName::PoolPidOrName, Milliseconds::Timeout) -> 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, Jul 22 2022, 03:53:27.