libsxmp/man/sxhub_create.3

81 lines
1.9 KiB
Groff
Raw Normal View History

2015-10-27 00:20:44 +02:00
.TH SXHUB_CREATE 3 "20 July 2015" "SXMP" "SXMP Library Manual"
2015-07-25 05:36:04 +03:00
.SH NAME
2015-11-13 15:04:19 +02:00
sxhub_create \- Allocate and initialize links hub
2015-07-25 05:36:04 +03:00
.br
2015-11-13 15:04:19 +02:00
sxhub_init \- Initialize links hub
2015-07-25 05:36:04 +03:00
.br
2015-11-13 15:04:19 +02:00
sxhub_destroy \- Destroy links hub
2015-07-25 05:36:04 +03:00
.br
2015-11-13 15:04:19 +02:00
sxhub_free \- Free all stuff allocated for hub
2015-07-25 05:36:04 +03:00
.SH SYNOPSIS
2015-10-27 00:20:44 +02:00
.B #include <sxmp/sxmp.h>
2015-07-25 05:36:04 +03:00
.sp
2015-10-27 00:20:44 +02:00
sxhub_t *sxhub_create(void);
2015-07-25 05:36:04 +03:00
2015-10-27 00:20:44 +02:00
int sxhub_init(sxhub_t *ssys);
2015-07-25 05:36:04 +03:00
2015-10-27 00:20:44 +02:00
int sxhub_destroy(sxhub_t *ssys);
2015-07-25 05:36:04 +03:00
2015-10-27 00:20:44 +02:00
int sxhub_free(sxhub_t *ssys);
2015-07-25 05:36:04 +03:00
.br
.sp
.SH DESCRIPTION
2015-10-27 00:20:44 +02:00
.B sxhub_create
2015-11-13 15:04:19 +02:00
will create a new hub used for handling creation and initialization of the links.
2015-10-27 00:20:44 +02:00
.B sxhub_init
2015-07-25 05:36:04 +03:00
will do the same, but it will take an already preallocated pointer.
.br
2015-10-27 00:20:44 +02:00
.B sxhub_destroy
2015-11-13 15:04:19 +02:00
will deallocate all related to the hub, include pointer
2015-07-25 05:36:04 +03:00
.BI ssys
, but
2015-10-27 00:20:44 +02:00
.B sxhub_free
2015-07-25 05:36:04 +03:00
will not free this pointer consider it will be deallocated by user.
.br
.SH RETURN VALUE
Upon successful completion, the function
2015-10-27 00:20:44 +02:00
.B sxhub_create
2015-11-13 15:04:19 +02:00
will return a valid pointer to the newly created links hub.
2015-10-27 00:20:44 +02:00
.B sxhub_init
2015-07-25 05:36:04 +03:00
will return
.B 0
.br
Otherwise NULL will be returned and errno will be set, or error will be returned, in case of
2015-10-27 00:20:44 +02:00
.B sxhub_init
2015-07-25 05:36:04 +03:00
use.
.SH ERRORS
2015-10-27 00:20:44 +02:00
.B sxhub_init
2015-07-25 05:36:04 +03:00
will return,
2015-10-27 00:20:44 +02:00
.B sxhub_create will set
2015-07-25 05:36:04 +03:00
.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
2015-11-13 15:04:19 +02:00
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).
2015-07-26 05:05:02 +03:00
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
2015-10-27 00:20:44 +02:00
.BI sxhub_setsslserts(3)
2015-07-26 05:05:02 +03:00
,
2015-10-27 00:20:44 +02:00
.BI sxmp_init(3)
2015-07-25 05:36:04 +03:00
.SH COPYRIGHT
2015-12-29 22:42:52 +02:00
This software licensed under GNU LGPL v3. See COPYING for further details.
2015-07-25 05:36:04 +03:00
.br
(c) Askele Group 2013-2015 <http://askele.com>
.SH AUTHOR
Alexander Vdolainen (vdo@askele.com)