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/sxmsg_rreply.3

60 lines
1.7 KiB
Groff

9 years ago
.TH SXMSG_RREPLY 3 "20 July 2015" "SXMP" "SXMP Library Manual"
.SH NAME
sxmsg_rreply \- Function used to send a rapid reply without confirmation
.SH SYNOPSIS
9 years ago
.B #include <sxmp/sxmp.h>
.br
9 years ago
.B #include <sxmp/limits.h>
.sp
9 years ago
int sxmsg_rreply(sxmsg_t
.BI *msg
, size_t
.BI datalen
);
.br
.sp
.SH DESCRIPTION
.B sxmsg_rreply
9 years ago
Will reply rapidly to the message using already allocated buffer, which must be
retrieved via
.B sxmsg_rapidbuf().
This function will write desired message as soon
as possible. It will not wait any write or delivery confirmation. It will close
message dialog if message is valid.
9 years ago
.br
.SH RETURN VALUE
9 years ago
Upon successful completion, the function shall rapidly send a message reply and close
the message dialog returning
.B SXE_SUCCESS
9 years ago
Othrewise other error code will be returned.
.SH ERRORS
.B SXE_FAILED
9 years ago
returns if message has invalid index, channel or message pointer is NULL.
.br
.B SXE_ESSL
returns if write was failed i.e. link was broken, or SSL error occurs.
9 years ago
.br
.B SNE_SUCCESS
returns on success.
.br
.SH BUGS
Not known yet.
.SH EXAMPLE
.B Reply rapidly from the RPC function call.
.RS
.nf
.if t .ft CW
char *buf = sxmsg_rapidbuf(msg);
int ln = snprintf(buf, MAX_RBBUF_LEN, "(is-done)");
9 years ago
return sxmsg_rreply(msg, str, ln);
9 years ago
.SH APPLICATION USAGE
9 years ago
This function will be useful in RPC functions required to reply ASAP i.e. for getting some data. If RPC function takes a lot of time it's better to use other functions and/or postponed message processing.
9 years ago
.SH RATIONALE
9 years ago
Use for lightweight RPC functions, this method can be used only in RPC call i.e. within SXMP thread context.
9 years ago
.SH COPYRIGHT
This is a proprietary software. See COPYING for further details.
.br
(c) Askele Group 2013-2015 <http://askele.com>
.SH AUTHOR
Alexander Vdolainen (vdo@askele.com)