141 return (
const DataStreamIter)msg.data();
158 mockMsg.resize(dataSize);
167 size_t dataSize(mockMsg.size());
PEmptySocket Socket
Define the socket of the backend used by the PAbstractSocketManager.
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.
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 Param client()
Create param for a client socket.
DataStreamMsg Message
Define the type of message used by the PAbstractSocketManager.
bool createServerSocket(Socket &socket, const PSocketParam &socketParam, const Param &extraParam)
Create a Server socket.
bool createClientSocket(Socket &socket, const PSocketParam &socketParam, const Param &extraParam)
Create a client socket.
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...
void close()
Close the PEmptySocket.
PRecvStatus::PRecvStatus recvMsg(Message &msg, PRecvFlag::PRecvFlag flag)
Recieved data with the socket.
bool createClientSocket(const PSocketParam &socketParam, const Param &extraParam)
Initialise a client socket.
bool createServerSocket(const PSocketParam &socketParam, const Param &extraParam)
Initialise a server socket.
virtual ~PEmptySocket()
Default destructor of hte PEmptySocket.
bool isConnected() const
Say if the PEmptySocket is connected.
void setIsMockRecord(bool isMockRecord)
Set the mock prefix (where to find/save it)
DataStreamMsg Message
Define the type of message used by the PAbstractSocketManager.
PEmptySocket()
Default constructor of hte PEmptySocket.
void setMockPrefix(const std::string &mockPrefix)
Set the mock prefix (where to find/save it)
PSendStatus::PSendStatus sendMsg(const Message &msg, PSendFlag::PSendFlag flag)
Specialisation to send a Message with the PEmptySocket.
PRecvFlag
describe the receiving flag of the Socket
PRecvStatus
describe the result of the recv
PSendFlag
describe the sending flag of the Socket
PSendStatus
describe the result of the send
Parameters to create a socket.