diff --git a/man/Makefile.am b/man/Makefile.am index 337116b..e5edd9c 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1,4 +1,4 @@ man_MANS = sxmsg_rreply.3 connections_create.3 connections_init.3 connections_destroy.3 connections_free.3 \ sntl_init.3 connections_setsslserts.3 connections_set_priv.3 connections_get_priv.3 \ connections_set_ondestroy.3 connections_set_onpulse.3 connections_set_sslvalidate.3 \ - connections_set_authcheck.3 connections_set_rpcvalidator.3 + connections_set_authcheck.3 connections_set_rpcvalidator.3 connections_set_channelcall.3 diff --git a/man/connections_set_channelcall.3 b/man/connections_set_channelcall.3 new file mode 100644 index 0000000..5754b07 --- /dev/null +++ b/man/connections_set_channelcall.3 @@ -0,0 +1,69 @@ +.TH CONNECTIONS_SET_CHANNELCALL 3 "20 July 2015" "SNTLLv2" "SNTL Library Manual" +.SH NAME +connections_set_channelcall \- Set callback for the connection links based on the connections set, called during connection link initiation on the client side. +.br +.SH SYNOPSIS +.B #include +.sp +#define connections_set_channelcall(c, f) + +.br +.sp +.SH DESCRIPTION +This macro should be used if you want to setup callback function fired while connection link initiating, it might be useful to sync your client ability to support masters protocol and/or correctly initialize your application. +.br +This macro will set on +.B c +connections link set callback +.B f +which is a function pointer of the type: +.br +.sp +.B typedef int (*channelcall_t)(conn_t *co, int tid, char *desc); +.br +.sp +It will pass a pointer to the connection link initiating now. Link isn't set fully at this moment and doesn't pass any messages and don't works with channel's operations. To pass initiation to the next stage this function should return +.B SNE_SUCCESS. +In fail case other code error should be returned. It's a good practice to return +.B SNE_IGNORED +if your application doesn't support protocol channels or outdated. +.br +SNTL will push channel type id in +.B tid +and text description in +.B desc +.br +This call will be invoked on each RPC channel. +.SH RETURN VALUE +None. +.SH ERRORS +None. +.SH BUGS +None known yet. +.SH EXAMPLE +This example shows the code prototype of such function: +.RS +.nf +.if t .ft CW +int rpcchanack(conn_t *co, int tid, char *desc) +{ + fprintf(stdout, "Master side supported RPC channel type: %d '%s'\n", tid, desc); + + return SNE_SUCCESS; /* all is fine */ +} +.SH APPLICATION USAGE +This function should be used on the client service, it will not be called on the master side anyway, since master provide RPC channels. +.SH RATIONALE +None. +.SH SEE ALSO +.BI connections_set_ondestroy(3) +, +.BI connection_getpriv(3) +, +.BI connection_setpriv(3) +.SH COPYRIGHT +This is a proprietary software. See COPYING for further details. +.br +(c) Askele Group 2013-2015 +.SH AUTHOR +Alexander Vdolainen (vdo@askele.com)