![]() |
|
PhoenixSocket
4.0.1
Library which integrates socket unix use in Phoenix
|
Example of an empty socket. More...
#include <PEmptyBackend.h>
Public Types | |
| typedef DataStreamMsg | Message |
| Define the type of message used by the PAbstractSocketManager. | |
| typedef PEmptyParam | Param |
| Define the type of extra parameters which can be used to create a Socket used by the PAbstractSocketManager. | |
Public Member Functions | |
| void | close () |
| Close the PEmptySocket. | |
| bool | createClientSocket (const PSocketParam &socketParam, const Param &extraParam) |
| Initialise a client socket. | |
| bool | createServerSocket (const PSocketParam &socketParam, const Param &extraParam) |
| Initialise a server socket. | |
| bool | isConnected () const |
| Say if the PEmptySocket is connected. | |
| PEmptySocket () | |
| Default constructor of hte PEmptySocket. | |
| template<typename T> | |
| PRecvStatus::PRecvStatus | recvData (T &data, PRecvFlag::PRecvFlag flag) |
| Recieved data with the socket. | |
| PRecvStatus::PRecvStatus | recvMsg (Message &msg, PRecvFlag::PRecvFlag flag) |
| Recieved data with the socket. | |
| template<typename T> | |
| PSendStatus::PSendStatus | sendData (const T &data, PSendFlag::PSendFlag flag) |
| Send data with the socket. | |
| PSendStatus::PSendStatus | sendMsg (const Message &msg, PSendFlag::PSendFlag flag) |
| Specialisation to send a Message with the PEmptySocket. | |
| void | setIsMockRecord (bool isMockRecord) |
| Set the mock prefix (where to find/save it) | |
| void | setMockPrefix (const std::string &mockPrefix) |
| Set the mock prefix (where to find/save it) | |
| virtual | ~PEmptySocket () |
| Default destructor of hte PEmptySocket. | |
Example of an empty socket.
Definition at line 17 of file PEmptyBackend.h.
| typedef DataStreamMsg PEmptySocket::Message |
Define the type of message used by the PAbstractSocketManager.
Definition at line 20 of file PEmptyBackend.h.
| typedef PEmptyParam PEmptySocket::Param |
Define the type of extra parameters which can be used to create a Socket used by the PAbstractSocketManager.
Definition at line 22 of file PEmptyBackend.h.
| PEmptySocket::PEmptySocket | ( | ) |
Default constructor of hte PEmptySocket.
Definition at line 10 of file PEmptyBackend.cpp.
|
virtual |
Default destructor of hte PEmptySocket.
Definition at line 15 of file PEmptyBackend.cpp.
| void PEmptySocket::close | ( | ) |
| bool PEmptySocket::createClientSocket | ( | const PSocketParam & | socketParam, |
| const Param & | extraParam ) |
Initialise a client socket.
| socketParam | : parameters to be use to initialise the socket (hostname, port, etc) |
| extraParam | : extra customisable parameters for the creation of the socket (depends on the backend) |
Definition at line 23 of file PEmptyBackend.cpp.
Referenced by PEmptyBackend::createClientSocket().
Here is the caller graph for this function:| bool PEmptySocket::createServerSocket | ( | const PSocketParam & | socketParam, |
| const Param & | extraParam ) |
Initialise a server socket.
| socketParam | : parameters to be use to initialise the socket (hostname, port, etc) |
| extraParam | : extra customisable parameters for the creation of the socket (depends on the backend) |
Definition at line 31 of file PEmptyBackend.cpp.
Referenced by PEmptyBackend::createServerSocket().
Here is the caller graph for this function:| bool PEmptySocket::isConnected | ( | ) | const |
Say if the PEmptySocket is connected.
Definition at line 66 of file PEmptyBackend.cpp.
| PRecvStatus::PRecvStatus PEmptySocket::recvData | ( | T & | data, |
| PRecvFlag::PRecvFlag | flag ) |
Recieved data with the socket.
| [out] | data | : data to be recieved with the socket |
| flag | : recieving flag (BLOCK, NON_BLOCK) |
Definition at line 39 of file PEmptyBackend_impl.h.
References PRecvStatus::CANNOT_DESERIALIZE_DATA, PRecvStatus::NO_MESSAGE_RECEIVED, PRecvStatus::OK, and recvMsg().
Here is the call graph for this function:| PRecvStatus::PRecvStatus PEmptySocket::recvMsg | ( | PEmptySocket::Message & | msg, |
| PRecvFlag::PRecvFlag | flag ) |
Recieved data with the socket.
| [out] | msg | : Message to be recieved with the socket |
| flag | : recieving flag (BLOCK, NON_BLOCK) |
Definition at line 59 of file PEmptyBackend.cpp.
References PRecvStatus::OK.
Referenced by recvData().
Here is the caller graph for this function:| PSendStatus::PSendStatus PEmptySocket::sendData | ( | const T & | data, |
| PSendFlag::PSendFlag | flag ) |
Send data with the socket.
| data | : data to be sent with the socket |
| flag | : sending flag (BLOCK, NON_BLOCK) |
Definition at line 19 of file PEmptyBackend_impl.h.
References PSendStatus::CANNOT_SERIALIZE_DATA, PSendStatus::OK, and sendMsg().
Here is the call graph for this function:| PSendStatus::PSendStatus PEmptySocket::sendMsg | ( | const Message & | msg, |
| PSendFlag::PSendFlag | flag ) |
Specialisation to send a Message with the PEmptySocket.
| msg | : Message to be sent |
| flag | : sending flag (BLOCK, NON_BLOCK) |
Definition at line 50 of file PEmptyBackend.cpp.
References PSendStatus::OK.
Referenced by sendData().
Here is the caller graph for this function:| void PEmptySocket::setIsMockRecord | ( | bool | isMockRecord | ) |
Set the mock prefix (where to find/save it)
| isMockRecord | : true if the mock has to be recorded |
Definition at line 43 of file PEmptyBackend.cpp.
| void PEmptySocket::setMockPrefix | ( | const std::string & | mockPrefix | ) |
Set the mock prefix (where to find/save it)
| mockPrefix | : prefix of the mock to find or write it |
Definition at line 38 of file PEmptyBackend.cpp.