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.
58 lines
1.7 KiB
Groff
58 lines
1.7 KiB
Groff
9 years ago
|
.TH SXMSG_RREPLY 3 "20 July 2015" "SNTLLv2" "SNTL Library Manual"
|
||
9 years ago
|
.SH NAME
|
||
|
sxmsg_rreply \- Function used to send a rapid reply without confirmation
|
||
|
.SH SYNOPSIS
|
||
|
.B #include <sntl/sntllv2.h>
|
||
|
.sp
|
||
9 years ago
|
int sxmsg_rreply(sxmsg_t
|
||
|
.BI *msg
|
||
|
, size_t
|
||
|
.BI datalen
|
||
|
);
|
||
9 years ago
|
.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 SNE_SUCCESS
|
||
|
Othrewise other error code will be returned.
|
||
|
.SH ERRORS
|
||
9 years ago
|
.B SNE_FAILED
|
||
|
returns if message has invalid index, channel or message pointer is NULL.
|
||
|
.br
|
||
|
.B SNE_ESSL
|
||
|
returns if write was failed i.e. connection link was broken, or SSL error occurs.
|
||
|
.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_BBUFLEN, "(is-done)");
|
||
|
return sxmsg_rreply(msg, str, ln);
|
||
9 years ago
|
.SH APPLICATION USAGE
|
||
|
This function will be useful in RPC functions required to reply ASAP i.e. for getting some data. It RPC function takes a lot of time it's better to use other functions and postponed message processing.
|
||
|
.SH RATIONALE
|
||
|
Use for lightweight RPC functions, this method may be used only in RPC call i.e. within SNTL thread context.
|
||
|
.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)
|