PhoenixSocket  4.0.1
Library which integrates socket unix use in Phoenix
Loading...
Searching...
No Matches
PMockBackend_impl.h File Reference
#include "PMockBackend.h"
+ Include dependency graph for PMockBackend_impl.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T>
bool socket_serialize_message (PMockSocket::Message &msg, const T &data)
 Serialize a message from data.
 

Function Documentation

◆ socket_serialize_message()

template<typename T>
bool socket_serialize_message ( PMockSocket::Message & msg,
const T & data )

Serialize a message from data.

Parameters
[out]msg: message to be filled with the data
data: data to be serialized in the message
Returns
status of the serialization

Definition at line 18 of file PMockBackend_impl.h.

18 {
19 size_t dataSize(data_size<T>(data));
20 msg.resize(dataSize);
21 DataStreamIter iter = (DataStreamIter)msg.data();
22 return data_message_save<T>(iter, data);
23}

Referenced by PMockSocket::recvData(), and PMockSocket::sendData().

+ Here is the caller graph for this function: