int port, const char *SSL_cert, const char *login,
const char *passwd);
int connection_close(conn_t *co);
.br
.sp
.SHDESCRIPTION
.Bconnection_master_link
will create a connection link based on
.Bssys
connections set with already accepted socket fd
.Bsck
and set ip address of this connection pointed by
.Baddr.
If
.Baddr
is NULL, peer address will not set.
.br
.Bconnection_link
will create a connection link to the master side based on
.Bssys
connections set to the master side pointed via hostname or ip address in nul terminated string
.Bhost
running on port number
.Bport
and send a X.509 certificate located on pathname pointed by
.BSSL_cert
trying to authorizated with username pointed by
.Blogin
and password pointed by
.Bpasswd
.br
.Bconnection_close
will close connection pointed by
.Bco
destroying all allocated structures, including connection link itself.
.br
.SHRETURNVALUE
Upon successful completion, the functions
.Bconnection_master_link
and
.Bconnection_link
will return a valid pointer to the newly created connection link. Otherwise NULL will be returned and
.Berrnowillbesetwithappropriateerror.
.Bconnection_close
will return
.BSNE_SUCCESS
on successful case, otherwise it will return an error described below.
.SHERRORS
.BSNE_FAILED
will be returned in case of bad params given.
.br
.BSNE_ENOMEM
will be returned if there are no memory available.
.br
.BSNE_BADPROTO
will be returned if other side has an invalid protocol.
.BSNE_EPERM
will be returned if permission was denied.
.br
.BSNE_LINKERROR
or
.BSNE_LINKBROKEN
will be returned if connection link is broken i.e. SSL read or write was failed due to the broken TCP connection.
.br
.SHBUGS
Not known yet.
.SHEXAMPLE
None.
.SHAPPLICATIONUSAGE
None.
.SHRATIONALE
Using connection_link on master side with initialized connections set for master functionality will cause memory leaks, use different connections set structure if you need this functionality on the masters side.