93 return (
const DataStreamIter)msg.data();
126 mockMsg.resize(dataSize);
135 size_t dataSize(mockMsg.size());
static bool createServerSocket(Socket &socket, const std::string &address, size_t port, const PEmptyParam ¶m)
Create a Server socket.
static bool isConnected(const Socket &socket)
Close the given socket.
static bool createClientSocket(Socket &socket, const std::string &address, size_t port, const PEmptyParam ¶m)
Create a client socket.
static const DataStreamIter msgData(const Message &msg)
Get the data of a message.
static size_t msgSize(const Message &msg)
Get the size of a message.
static void msgToMock(DataStreamMsg &mockMsg, const Message &msg)
Copy current backend message data into mock message.
int Socket
Define the socket of the backend used by the PAbstractSocketManager.
static bool recv(Socket &socket, Message &msg, PRecvFlag::PRecvFlag flag)
Recieve message from the given socket.
static void mockToMsg(Message &msg, DataStreamMsg &mockMsg)
Copy mock message data into current backend message.
static void msgResize(Message &msg, size_t sizeMsg)
Resize a message.
static Param server()
Create param for a server socket.
static bool send(Socket &socket, const Message &msg, PSendFlag::PSendFlag flag)
Send message on the given socket.
static Param client()
Create param for a client socket.
DataStreamMsg Message
Define the type of message used by the PAbstractSocketManager.
PEmptyBackend()
Default constructor of PEmptyBackend.
PEmptyParam Param
Define the type of extra parameters which can be used to create a Socket used by the PAbstractSocketM...
static void close(Socket &socket)
Close the given socket.
PRecvFlag
describe the recieving flag of the Socket
PSendFlag
describe the sending flag of the Socket
Set of parameters to be passed to create a socket with mock backend.