manual pages fixes;

v0.5.xx
Alexander Vdolainen 9 years ago
parent 5fbee7e086
commit bb124198c9

@ -14,12 +14,12 @@ This macro should be used if you want to setup callback function fired while pul
.br
This macro will set on
.B c
connections link set callback
hub links set callback
.B f
which is a function pointer of the type:
.br
.sp
.B typedef void (*onpulse_t)(conn_t *, sexp_t *);
.B typedef void (*onpulse_t)(sxlink_t *, sexp_t *);
.br
.sp
This function will be called if connection link will receive pulse message. It will pass a pointer to the connection where pulse message came and prepared S expression. Please note, prepared S expression structure will be destroyed after a function call.

@ -1,8 +1,8 @@
.TH SXHUB_SET_PRIV 3 "20 July 2015" "SXMP" "SXMP Library Manual"
.SH NAME
sxhub_set_priv \- Set a private pointer to the connection links set
sxhub_set_priv \- Set a private pointer to the links hub
.br
sxhub_get_priv \- Get a private pointer of the connection links set
sxhub_get_priv \- Get a private pointer of the links hub
.br
.SH SYNOPSIS
.B #include <sxmp/sxmp.h>
@ -29,7 +29,7 @@ to connections set
.B sxhub_get_priv
will return your pointer set to
.B c
connection set.
hub link.
.br
.SH RETURN VALUE
None in case of

@ -1,6 +1,6 @@
.TH SXHUB_SET_RPCVALIDATOR 3 "20 July 2015" "SXMP" "SXMP Library Manual"
.SH NAME
sxhub_set_rpcvalidator \- Set callback for the connection links based on the connections set, called to validate and setup RPC channels.
sxhub_set_rpcvalidator \- Set callback for the links created on the hub, called to validate and setup RPC channels.
.br
.SH SYNOPSIS
.B #include <sxmp/sxmp.h>
@ -10,7 +10,7 @@ sxhub_set_rpcvalidator \- Set callback for the connection links based on the con
.br
.sp
.SH DESCRIPTION
This macro should be used if you want to setup callback function fired while connection link initiating, this call shouldn't be ignored since it setups the RPC channels tree structure used within the connection link.
This macro should be used if you want to setup callback function fired while link initiating, this call shouldn't be ignored since it setups the RPC channels tree structure used within the connection link.
.br
This macro will set on
.B c
@ -19,7 +19,7 @@ connections link set callback
which is a function pointer of the type:
.br
.sp
.B typedef usrtc_t* (*rpcvalidate_t)(conn_t *);
.B typedef usrtc_t* (*rpcvalidate_t)(sxlink_t *);
.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
@ -53,11 +53,11 @@ None.
,
.BI sxhub_set_sslvalidate(3)
,
.BI connection_getpctx(3)
.BI sxlink_getpctx(3)
,
.BI connection_getpriv(3)
.BI sxlink_getpriv(3)
,
.BI connection_setpriv(3)
.BI sxlink_setpriv(3)
,
.BI sxmp_rpclist_init(3)
,

@ -1,6 +1,6 @@
.TH SXHUB_SET_SSLVALIDATE 3 "20 July 2015" "SXMP" "SXMP Library Manual"
.SH NAME
sxhub_set_sslvalidate \- Set callback for the connection links based on the connections set, called to validate x.509 certificate of peer by serial number.
sxhub_set_sslvalidate \- Set callback for the links created on the pointed hub, called to validate x.509 certificate of peer by serial number.
.br
.SH SYNOPSIS
.B #include <sxmp/sxmp.h>
@ -19,7 +19,7 @@ connections link set callback
which is a function pointer of the type:
.br
.sp
.B typedef int (*validate_sslpem_t)(conn_t *);
.B typedef int (*validate_sslpem_t)(sxlink_t *);
.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
@ -36,9 +36,9 @@ This example shows the code prototype for the simple check:
.RS
.nf
.if t .ft CW
int validatex509(conn_t *co)
int validatex509(sxlink_t *co)
{
perm_ctx_t *ctx = connection_getpctx(co);
sxsession_ctx_t *ctx = sxlink_getpctx(co);
uint64_t x509serial = ctx->certid;
/* do checks ... */
@ -56,11 +56,11 @@ None.
,
.BI sxhub_set_ondestroy(3)
,
.BI connection_getpctx(3)
.BI sxlink_getpctx(3)
,
.BI connection_getpriv(3)
.BI sxlink_getpriv(3)
,
.BI connection_setpriv(3)
.BI sxlink_setpriv(3)
.SH COPYRIGHT
This is a proprietary software. See COPYING for further details.
.br

@ -51,9 +51,9 @@ since you will required to pass it via call.
.SH RATIONALE
None.
.SH SEE ALSO
.BI connection_link(3)
.BI sxlink_connect(3)
,
.BI connection_link_master(3)
.BI sxlink_master_accept(3)
.SH COPYRIGHT
This is a proprietary software. See COPYING for further details.
.br

@ -1,28 +1,28 @@
.TH CONNECTION_MASTER_LINK 3 "20 July 2015" "SXMP" "SXMP Library Manual"
.TH SXLINK_MASTER_ACCEPT 3 "20 July 2015" "SXMP" "SXMP Library Manual"
.SH NAME
connection_master_link \- Create a connection on already accept TCP connection on the master side.
sxlink_master_accept \- Create a new link on already accept TCP connection on the master side.
.br
connection_link \- Create connection to the master.
sxlink_connect \- Create link to the master.
.br
connection_close \- Close connection.
sxlink_close \- Close link.
.SH SYNOPSIS
.B #include <sxmp/sxmp.h>
.sp
conn_t *connection_master_link(sxhub_t *ssys, int sck, struct in_addr *addr);
sxlink_t *sxlink_master_accept(sxhub_t *ssys, int sck, struct in_addr *addr);
conn_t *connection_link(sxhub_t *ssys, const char *host,
sxlink_t *sxlink_connect(sxhub_t *ssys, const char *host,
int port, const char *SSL_cert, const char *login,
const char *passwd);
int connection_close(conn_t *co);
int sxlink_close(sxlink_t *co);
.br
.sp
.SH DESCRIPTION
.B connection_master_link
will create a connection link based on
.B sxlink_master_accept
will create a new link within
.B ssys
connections set with already accepted socket fd
hub with already accepted socket fd
.B sck
and set ip address of this connection pointed by
.B addr.
@ -30,10 +30,10 @@ If
.B addr
is NULL, peer address will not set.
.br
.B connection_link
will create a connection link to the master side based on
.B sxlink_connect
will create a new link to the master side using
.B ssys
connections set to the master side pointed via hostname or ip address in nul terminated string
hub to the host pointed via hostname or ip address in nul terminated string
.B host
running on port number
.B port
@ -44,37 +44,37 @@ trying to authorizated with username pointed by
and password pointed by
.B passwd
.br
.B connection_close
will close connection pointed by
.B sxlink_close
will close link pointed by
.B co
destroying all allocated structures, including connection link itself.
.br
.SH RETURN VALUE
Upon successful completion, the functions
.B connection_master_link
.B sxlink_master_accept
and
.B connection_link
will return a valid pointer to the newly created connection link. Otherwise NULL will be returned and
.B sxlink_connect
will return a valid pointer to the newly created link. Otherwise NULL will be returned and
.B errno will be set with appropriate error.
.B connection_close
.B sxlink_close
will return
.B SNE_SUCCESS
.B SXE_SUCCESS
on successful case, otherwise it will return an error described below.
.SH ERRORS
.B SNE_FAILED
.B SXE_FAILED
will be returned in case of bad params given.
.br
.B SNE_ENOMEM
.B SXE_ENOMEM
will be returned if there are no memory available.
.br
.B SNE_BADPROTO
.B SXE_BADPROTO
will be returned if other side has an invalid protocol.
.B SNE_EPERM
.B SXE_EPERM
will be returned if permission was denied.
.br
.B SNE_LINKERROR
.B SXE_LINKERROR
or
.B SNE_LINKBROKEN
.B SXE_LINKBROKEN
will be returned if connection link is broken i.e. SSL read or write was failed due to the broken TCP connection.
.br
.SH BUGS

Loading…
Cancel
Save