2 ==================================================================================
3 Copyright (c) 2019 Nokia
4 Copyright (c) 2018-2019 AT&T Intellectual Property.
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 ==================================================================================
20 Mnemonic rmr_rcv_msg_man.xfm
21 Abstract The manual page for the rmr_rcv_msg function.
22 Author E. Scott Daniels
27 .im &{lib}/man/setup.im
31 &h1(RMR Library Functions)
40 rmr_mbuf_t* rmr_rcv_msg( void* vctx, rmr_mbuf_t* old_msg );
45 The &cw(rmr_rcv_msg) function blocks until a message is received, returning
46 the message to the caller via a pointer to a &cw(rmr_mbuf_t) structure type.
47 If messages were queued while waiting for the response to a previous invocation
48 of &cw(rmr_call,) the oldest message is removed from the queue and returned
52 The &ital(vctx) pointer is the pointer returned by the &cw(rmr_init) function.
53 &ital(Old_msg) is a pointer to a previously used message buffer or NULL.
54 The ability to reuse message buffers helps to avoid alloc/free cycles in the
56 When no buffer is available to supply, the receive function will allocate one.
59 The function returns a pointer to the &cw(rmr_mbuf_t) structure which references
60 the message information (state, length, payload), or a NULL pointer in the case
64 The &ital(state) field in the message buffer will indicate either &cw(RMR_OK) or
65 &cw(RMR_ERR_EMPTY) if an empty message was received.
66 If a nil pointer is returned, or any other state value was set in the message
67 buffer, &cw(errno) will be set to one of the following:
70 &beg_dlist(.75i : ^&bold_font )
71 &di(INVAL) Parameter(s) passed to the function were not valid.
74 &di(EBADF) The underlying message transport is unable to process the request.
77 &di(ENOTSUP) The underlying message transport is unable to process the request.
80 &di(EFSM) The underlying message transport is unable to process the request.
83 &di(EAGAIN) The underlying message transport is unable to process the request.
86 &di(EINTR) The underlying message transport is unable to process the request.
89 &di(ETIMEDOUT) The underlying message transport is unable to process the request.
92 &di(ETERM) The underlying message transport is unable to process the request.