|
XPMP2
X-Plane multiplayer library 2 - using instancing
|
Helper class to manage the temporary buffers in which the network message are put together. More...
#include <Remote.h>
Public Member Functions | |
| RmtMsgBufTy () | |
| Constructor: everything stays zeroed. More... | |
| ~RmtMsgBufTy () | |
| Destructor makes sure the buffer is freed up. More... | |
| void | free () |
| Free up the buffer, basically a reset. More... | |
| void | init () |
| If necessary allocate the required buffer, then initialize it to an empty message. More... | |
| bool | add (const ElemTy &_elem) |
| Add another element to the buffer, returns if successful (otherwise full!) More... | |
| bool | empty () const |
| is empty, contains no payload? More... | |
| void | send (UDPMulticast &_mc) |
| send the message (if there is any), then reset the buffer More... | |
| bool | add_send (const ElemTy &_elem, UDPMulticast &_mc) |
| Perform add(), then if necessary send(); returns if sent. More... | |
Public Attributes | |
| void * | pMsg = nullptr |
| points to the actual message buffer of size glob.remoteBufSize More... | |
| size_t | elemCount = 0 |
| number of elements already added to the message More... | |
| size_t | size = 0 |
| current message size More... | |
Helper class to manage the temporary buffers in which the network message are put together.
|
inline |
Constructor: everything stays zeroed.
|
inline |
Destructor makes sure the buffer is freed up.
| bool XPMP2::RmtMsgBufTy< ElemTy, MsgTy, msgVer >::add | ( | const ElemTy & | _elem | ) |
Add another element to the buffer, returns if successful (otherwise full!)
| bool XPMP2::RmtMsgBufTy< ElemTy, MsgTy, msgVer >::add_send | ( | const ElemTy & | _elem, |
| UDPMulticast & | _mc | ||
| ) |
|
inline |
is empty, contains no payload?
| void XPMP2::RmtMsgBufTy< ElemTy, MsgTy, msgVer >::free |
Free up the buffer, basically a reset.
| void XPMP2::RmtMsgBufTy< ElemTy, MsgTy, msgVer >::init |
If necessary allocate the required buffer, then initialize it to an empty message.
| void XPMP2::RmtMsgBufTy< ElemTy, MsgTy, msgVer >::send | ( | UDPMulticast & | _mc | ) |
send the message (if there is any), then reset the buffer
| size_t XPMP2::RmtMsgBufTy< ElemTy, MsgTy, msgVer >::elemCount = 0 |
number of elements already added to the message
| void* XPMP2::RmtMsgBufTy< ElemTy, MsgTy, msgVer >::pMsg = nullptr |
points to the actual message buffer of size glob.remoteBufSize
| size_t XPMP2::RmtMsgBufTy< ElemTy, MsgTy, msgVer >::size = 0 |
current message size