You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libsxmp/man/sxhub_create.3

81 lines
1.9 KiB
Groff

9 years ago
.TH SXHUB_CREATE 3 "20 July 2015" "SXMP" "SXMP Library Manual"
.SH NAME
9 years ago
sxhub_create \- Allocate and initialize links hub
.br
9 years ago
sxhub_init \- Initialize links hub
.br
9 years ago
sxhub_destroy \- Destroy links hub
.br
9 years ago
sxhub_free \- Free all stuff allocated for hub
.SH SYNOPSIS
9 years ago
.B #include <sxmp/sxmp.h>
.sp
9 years ago
sxhub_t *sxhub_create(void);
9 years ago
int sxhub_init(sxhub_t *ssys);
9 years ago
int sxhub_destroy(sxhub_t *ssys);
9 years ago
int sxhub_free(sxhub_t *ssys);
.br
.sp
.SH DESCRIPTION
9 years ago
.B sxhub_create
9 years ago
will create a new hub used for handling creation and initialization of the links.
9 years ago
.B sxhub_init
will do the same, but it will take an already preallocated pointer.
.br
9 years ago
.B sxhub_destroy
9 years ago
will deallocate all related to the hub, include pointer
.BI ssys
, but
9 years ago
.B sxhub_free
will not free this pointer consider it will be deallocated by user.
.br
.SH RETURN VALUE
Upon successful completion, the function
9 years ago
.B sxhub_create
9 years ago
will return a valid pointer to the newly created links hub.
9 years ago
.B sxhub_init
will return
.B 0
.br
Otherwise NULL will be returned and errno will be set, or error will be returned, in case of
9 years ago
.B sxhub_init
use.
.SH ERRORS
9 years ago
.B sxhub_init
will return,
9 years ago
.B sxhub_create will set
.B errno
to:
.br
.B ENOMEM
Not enough memory to allocate all required stuff.
.br
.B EINVAL
Returned if invalid pointer given.
.br
.SH BUGS
Not known yet.
.SH EXAMPLE
None.
.SH APPLICATION USAGE
None.
.SH RATIONALE
9 years ago
Link destroy function might be used carefully, the logic of there functions is a
send a special link layer message that will close the link on the master side (and within masters hub).
The reason to care about is a delivery of all messages, channels and other stuff, because
when this functions called all pending messages are drops.
.SH SEE ALSO
9 years ago
.BI sxhub_setsslserts(3)
,
9 years ago
.BI sxmp_init(3)
.SH COPYRIGHT
This software licensed under GNU LGPL v3. See COPYING for further details.
.br
(c) Askele Group 2013-2015 <http://askele.com>
.SH AUTHOR
Alexander Vdolainen (vdo@askele.com)