cfg_key() = connect_timeout | client_id | extra_sock_opts | debug | nolink | query_api_versions | request_timeout | sasl | ssl
cfg_val() = term()
config() = [{cfg_key(), cfg_val()}] | #{cfg_key() => cfg_val()}
connection() = pid()
hostname() = kpro:hostname()
portnum() = kpro:portnum()
all_cfg_keys/0 | Return all config keys make client config management easy. |
debug/2 | Enable/disable debugging on the socket process. |
format_status/2 | |
get_api_vsns/1 | |
get_endpoint/1 | |
init/4 | |
loop/2 | |
request_async/2 | Send a request. |
request_sync/3 | Send a request and wait for response for at most Timeout milliseconds. |
send/2 | Same as @link request_async/2. |
start/3 | Connect to the given endpoint. |
stop/1 | Stop socket process. |
system_code_change/4 | |
system_continue/3 | |
system_terminate/4 |
all_cfg_keys() -> [cfg_key()]
Return all config keys make client config management easy.
debug(Pid::connection(), File::print | string() | none) -> ok
Enable/disable debugging on the socket process. debug(Pid, pring) prints debug info on stdout debug(Pid, File) prints debug info into a File debug(Pid, none) stops debugging
format_status(Opt, Status) -> any()
get_api_vsns(Pid::pid()) -> {ok, undefined | kpro:vsn_ranges()} | {error, any()}
get_endpoint(Pid::pid()) -> {ok, kpro:endpoint()} | {error, any()}
init(Parent::pid(), Host::hostname(), Port::portnum(), Config::config()) -> no_return()
loop(State, Debug) -> any()
request_async(Pid::connection(), Request::kpro:req()) -> ok | {error, any()}
Send a request. Caller should expect to receive a response
having Rsp#kpro_rsp.ref
the same as Request#kpro_req.ref
unless Request#kpro_req.no_ack
is set to 'true'
request_sync(Pid::connection(), Request::kpro:req(), Timeout::timeout()) -> ok | {ok, kpro:rsp()} | {error, any()}
Send a request and wait for response for at most Timeout milliseconds.
send(Pid::connection(), Request::kpro:req()) -> ok
Same as @link request_async/2. Only that the message towards connection process is a cast (not a call). Always return 'ok'.
start(Host::hostname(), Port::portnum(), Config::config()) -> {ok, pid()} | {error, any()}
Connect to the given endpoint.
The started connection pid is linked to caller
unless nolink := true
is found in Config
stop(Pid::connection()) -> ok | {error, any()}
Stop socket process.
system_code_change(State, Module, Vsn, Extra) -> any()
system_continue(Parent, Debug, State) -> any()
system_terminate(Reason::any(), Parent::term(), Debug::term(), Misc::term()) -> no_return()
Generated by EDoc