#include "utilities.hpp"
#include <sys/socket.h>
#include <unistd.h>
#include <string.h>
Go to the source code of this file.
|
template<typename Msg > |
void | send_msg (const int sock) |
| Sends a header only Msg to sock. More...
|
|
template<typename Msg > |
void | send_msg (const int sock, const char *const bdy) |
| Sends a non-header only Msg with body bdy to sock. More...
|
|
template<typename Msg > |
void | recv_msg (const int sock) |
| Reads a header only Msg from sock. More...
|
|
template<typename Msg > |
const char * | recv_msg_and_body (const int sock) |
| Reads a only Msg from sock This function is NOT re-entrant. More...
|
|
#define MESSAGE_HEADER_LENGTH 4 |
The number of characters a message header can be.
#define MESSAGE_INTERNALS |
( |
|
HEADER_ONLY | ) |
|
Value: \
static const constexpr bool header_only = HEADER_ONLY; \ \
static const constexpr char *const header = Info::header; \ \
"Header is of wrong size." ); \ \
MessageType<HEADER_ONLY, Info>() = delete;
#define MESSAGE_HEADER_LENGTH
The number of characters a message header can be.
Definition: message.hpp:24
#define MESSAGE_SIZE
The size of a message.
Definition: message.hpp:27
The internals of a message.
We use a macro to enforce consistency
#define POINTER_SIZE ( sizeof( void * ) ) |
The size of a pointer in the target program Note: 64 bit can stil handle 32 bit programs.
template<typename Msg >
void recv_msg |
( |
const int |
sock | ) |
|
Reads a header only Msg from sock.
template<typename Msg >
const char* recv_msg_and_body |
( |
const int |
sock | ) |
|
Reads a only Msg from sock This function is NOT re-entrant.
template<typename Msg >
void send_msg |
( |
const int |
sock | ) |
|
Sends a header only Msg to sock.
template<typename Msg >
void send_msg |
( |
const int |
sock, |
|
|
const char *const |
bdy |
|
) |
| |
Sends a non-header only Msg with body bdy to sock.