Nanomsg message.
More...
#include <message.h>
◆ Message() [1/5]
CppServer::Nanomsg::Message::Message |
( |
| ) |
|
Create an empty message.
Definition at line 19 of file message.cpp.
◆ Message() [2/5]
CppServer::Nanomsg::Message::Message |
( |
size_t |
size, |
|
|
int |
type = 0 |
|
) |
| |
|
explicit |
Allocate memory for a new message.
Allocate type parameter specifies type of allocation mechanism to use. Zero is the default one, however, individual transport mechanisms may define their own allocation mechanisms, such as allocating in shared memory or allocating a memory block pinned down to a physical memory address. Such allocation, when used with the transport that defines them, should be more efficient than the default allocation mechanism.
- Parameters
-
size | - Message size |
type | - Allocate type (default is 0) |
Definition at line 23 of file message.cpp.
◆ Message() [3/5]
CppServer::Nanomsg::Message::Message |
( |
const void * |
data, |
|
|
size_t |
size, |
|
|
int |
type = 0 |
|
) |
| |
|
explicit |
Create a new message based on the given buffer.
- Parameters
-
data | - Message data |
size | - Message size |
type | - Allocate type (default is 0) |
Definition at line 32 of file message.cpp.
◆ Message() [4/5]
CppServer::Nanomsg::Message::Message |
( |
const Message & |
message | ) |
|
◆ Message() [5/5]
CppServer::Nanomsg::Message::Message |
( |
Message && |
| ) |
|
|
defaultnoexcept |
◆ ~Message()
CppServer::Nanomsg::Message::~Message |
( |
| ) |
|
◆ buffer() [1/2]
uint8_t* CppServer::Nanomsg::Message::buffer |
( |
| ) |
|
|
inlinenoexcept |
Get the message buffer.
Definition at line 67 of file message.h.
◆ buffer() [2/2]
const uint8_t* CppServer::Nanomsg::Message::buffer |
( |
| ) |
const |
|
inlinenoexcept |
Get the constant message buffer.
Definition at line 69 of file message.h.
◆ Clear()
void CppServer::Nanomsg::Message::Clear |
( |
| ) |
|
Clear the message buffer.
Definition at line 60 of file message.cpp.
◆ operator bool()
CppServer::Nanomsg::Message::operator bool |
( |
| ) |
const |
|
inlineexplicit |
Check if the message is valid.
Definition at line 64 of file message.h.
◆ operator=() [1/2]
Message & CppServer::Nanomsg::Message::operator= |
( |
const Message & |
message | ) |
|
◆ operator=() [2/2]
◆ Reallocate()
void CppServer::Nanomsg::Message::Reallocate |
( |
size_t |
size | ) |
|
Reallocate the message size.
- Parameters
-
Definition at line 71 of file message.cpp.
◆ size()
size_t CppServer::Nanomsg::Message::size |
( |
| ) |
const |
|
inlinenoexcept |
Get the message size.
Definition at line 71 of file message.h.
◆ string()
std::string CppServer::Nanomsg::Message::string |
( |
| ) |
const |
|
inline |
◆ swap()
void CppServer::Nanomsg::Message::swap |
( |
Message & |
message | ) |
|
|
inlinenoexcept |
◆ type()
int CppServer::Nanomsg::Message::type |
( |
| ) |
const |
|
inlinenoexcept |
Get the message type.
Definition at line 73 of file message.h.
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const Message & |
instance |
|
) |
| |
|
friend |
Output instance into the given output stream.
Definition at line 88 of file message.h.
◆ Socket
◆ swap
The documentation for this class was generated from the following files: