![]() |
|
PhoenixSocket
4.0.1
Library which integrates socket unix use in Phoenix
|
Backend to use Mock library with PAbtractSocket. More...
#include <PMockBackend.h>
Public Types | |
| typedef DataStreamMsg | Message |
| Define the type of message used by the PAbstractSocketManager. | |
| typedef PMockParam | Param |
| Define the type of extra parameters which can be used to create a Socket used by the PAbstractSocketManager. | |
| typedef PMockSocket | Socket |
| Define the socket of the backend used by the PAbstractSocketManager. | |
Public Member Functions | |
| bool | createClientSocket (Socket &socket, const PSocketParam &socketParam, const PMockParam ¶m) |
| Create a client socket. | |
| bool | createServerSocket (Socket &socket, const PSocketParam &socketParam, const PMockParam ¶m) |
| Create a client socket. | |
| PMockBackend () | |
| Default constructor of PMockBackend. | |
Static Public Member Functions | |
| static Param | client () |
| Create param for a client socket. | |
| static void | mockToMsg (Message &msg, DataStreamMsg &mockMsg) |
| Copy mock message data into current backend message. | |
| static const DataStreamIter | msgData (const Message &msg) |
| Get the data of a message. | |
| static DataStreamIter | msgData (Message &msg) |
| Get the data of a message. | |
| static void | msgResize (Message &msg, size_t sizeMsg) |
| Resize 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 Param | server () |
| Create param for a server socket. | |
Backend to use Mock library with PAbtractSocket.
Definition at line 53 of file PMockBackend.h.
| typedef DataStreamMsg PMockBackend::Message |
Define the type of message used by the PAbstractSocketManager.
Definition at line 58 of file PMockBackend.h.
| typedef PMockParam PMockBackend::Param |
Define the type of extra parameters which can be used to create a Socket used by the PAbstractSocketManager.
Definition at line 60 of file PMockBackend.h.
| typedef PMockSocket PMockBackend::Socket |
Define the socket of the backend used by the PAbstractSocketManager.
Definition at line 56 of file PMockBackend.h.
| PMockBackend::PMockBackend | ( | ) |
Default constructor of PMockBackend.
Definition at line 119 of file PMockBackend.cpp.
|
static |
Create param for a client socket.
Definition at line 126 of file PMockBackend.cpp.
Referenced by server().
Here is the caller graph for this function:| bool PMockBackend::createClientSocket | ( | PMockBackend::Socket & | socket, |
| const PSocketParam & | socketParam, | ||
| const PMockParam & | param ) |
Create a client socket.
| [out] | socket | : socket to be created |
| socketParam | : parameters of the socket (host, port, send/recv timeout) | |
| param | : extra customisable parameters for the creation of the socket (depends on the backend) |
Definition at line 144 of file PMockBackend.cpp.
References PMockSocket::createClientSocket().
Referenced by createServerSocket().
Here is the call graph for this function:
Here is the caller graph for this function:| bool PMockBackend::createServerSocket | ( | PMockBackend::Socket & | socket, |
| const PSocketParam & | socketParam, | ||
| const PMockParam & | param ) |
Create a client socket.
| [out] | socket | : socket to be created |
| socketParam | : parameters of the socket (host, port, send/recv timeout) | |
| param | : extra customisable parameters for the creation of the socket (depends on the backend) |
Definition at line 154 of file PMockBackend.cpp.
References createClientSocket().
Here is the call graph for this function:
|
static |
Copy mock message data into current backend message.
| [out] | msg | : message of the current backend to be converted |
| mockMsg | : mock message |
Definition at line 204 of file PMockBackend.cpp.
References msgData(), and msgResize().
Here is the call graph for this function:
|
static |
Get the data of a message.
| msg | : message to be used |
Definition at line 178 of file PMockBackend.cpp.
Referenced by mockToMsg(), and msgToMock().
Here is the caller graph for this function:
|
static |
Get the data of a message.
| msg | : message to be used |
Definition at line 186 of file PMockBackend.cpp.
|
static |
Resize a message.
| [out] | msg | : message to be resized |
| sizeMsg | : new size of the message |
Definition at line 162 of file PMockBackend.cpp.
Referenced by mockToMsg().
Here is the caller graph for this function:
|
static |
Get the size of a message.
| msg | : message to be used |
Definition at line 170 of file PMockBackend.cpp.
Referenced by msgToMock().
Here is the caller graph for this function:
|
static |
Copy current backend message data into mock message.
| [out] | mockMsg | : mock message |
| msg | : message of the current backend to be converted |
Definition at line 194 of file PMockBackend.cpp.
References msgData(), and msgSize().
Here is the call graph for this function:
|
static |
Create param for a server socket.
Definition at line 134 of file PMockBackend.cpp.
References client().
Here is the call graph for this function: