![]() |
|
PhoenixZMQ
6.0.0
Library which integrates zeromq use
|
PhoenixSocket API bridge to ZMQ socket. More...
#include <PZmqBackend.h>
Public Types | |
| typedef zmq::message_t | Message |
| Define the type of message used by the PAbstractSocketManager. | |
| typedef PZmqParam | 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 socket. | |
| bool | createClientSocket (zmq::context_t &context, const PSocketParam &socketParam, const Param &extraParam) |
| Create a client socket. | |
| bool | createServerSocket (zmq::context_t &context, const PSocketParam &socketParam, const Param &extraParam) |
| Create a server socket. | |
| bool | isConnected () const |
| Check if the socket is connected. | |
| PZmqSocket () | |
| Default constructor of PZmqSocket. | |
| template<typename T> | |
| PRecvStatus::PRecvStatus | recvData (T &data, PRecvFlag::PRecvFlag flag=PRecvFlag::BLOCK) |
| Recieved data with the socket. | |
| PRecvStatus::PRecvStatus | recvMsg (Message &msg, PRecvFlag::PRecvFlag flag=PRecvFlag::BLOCK) |
| Receive data with the socket. | |
| template<typename T> | |
| PSendStatus::PSendStatus | sendData (const T &data, PSendFlag::PSendFlag flag=PSendFlag::BLOCK) |
| Send data with the socket. | |
| PSendStatus::PSendStatus | sendMsg (Message &msg, PSendFlag::PSendFlag flag=PSendFlag::BLOCK) |
| Send data with the socket. | |
| virtual | ~PZmqSocket () |
| Destructor of PZmqSocket. | |
Private Attributes | |
| zmq::socket_t * | p_socket |
| ZMQ Socket. | |
PhoenixSocket API bridge to ZMQ socket.
Definition at line 38 of file PZmqBackend.h.
| typedef zmq::message_t PZmqSocket::Message |
Define the type of message used by the PAbstractSocketManager.
Definition at line 41 of file PZmqBackend.h.
| typedef PZmqParam PZmqSocket::Param |
Define the type of extra parameters which can be used to create a Socket used by the PAbstractSocketManager.
Definition at line 43 of file PZmqBackend.h.
| PZmqSocket::PZmqSocket | ( | ) |
Default constructor of PZmqSocket.
Definition at line 121 of file PZmqBackend.cpp.
References p_socket.
|
virtual |
Destructor of PZmqSocket.
Definition at line 128 of file PZmqBackend.cpp.
References close().
Here is the call graph for this function:| void PZmqSocket::close | ( | ) |
Close the socket.
Definition at line 239 of file PZmqBackend.cpp.
References p_socket.
Referenced by ~PZmqSocket().
Here is the caller graph for this function:| bool PZmqSocket::createClientSocket | ( | zmq::context_t & | context, |
| const PSocketParam & | socketParam, | ||
| const Param & | extraParam ) |
Create a client socket.
| context | : zmq context where to create socket |
| socketParam | : parameters of the server (hostname, port), the client has to connect to |
| extraParam | : extra customisable parameters for the creation of the socket (depends on the backend) |
Definition at line 138 of file PZmqBackend.cpp.
References PZmqParam::bufferSizeByte, PZmqParam::dataRate, PZmqParam::nbBufferMessage, p_socket, pzmq_createClientSocket(), PZmqParam::threadAffinity, and PZmqParam::type.
Referenced by PZmqBackend::createClientSocket().
Here is the call graph for this function:
Here is the caller graph for this function:| bool PZmqSocket::createServerSocket | ( | zmq::context_t & | context, |
| const PSocketParam & | socketParam, | ||
| const Param & | extraParam ) |
Create a server socket.
| context | : zmq context where to create socket |
| socketParam | : parameters of the server (hostname, port), the client has to connect to |
| extraParam | : extra customisable parameters for the creation of the socket (depends on the backend) |
Definition at line 157 of file PZmqBackend.cpp.
References PZmqParam::bufferSizeByte, PZmqParam::dataRate, PZmqParam::nbBufferMessage, p_socket, pzmq_createServerSocket(), PZmqParam::threadAffinity, and PZmqParam::type.
Referenced by PZmqBackend::createServerSocket().
Here is the call graph for this function:
Here is the caller graph for this function:| bool PZmqSocket::isConnected | ( | ) | const |
Check if the socket is connected.
Definition at line 231 of file PZmqBackend.cpp.
References p_socket.
| PRecvStatus::PRecvStatus PZmqSocket::recvData | ( | T & | data, |
| PRecvFlag::PRecvFlag | flag = PRecvFlag::BLOCK ) |
Recieved data with the socket.
| [out] | data | : data to be recieved with the socket |
| flag | : recieving flag (BLOCK, NON_BLOCK) |
Definition at line 71 of file PZmqBackend_impl.h.
References recvMsg().
Here is the call graph for this function:| PRecvStatus::PRecvStatus PZmqSocket::recvMsg | ( | Message & | msg, |
| PRecvFlag::PRecvFlag | flag = PRecvFlag::BLOCK ) |
Receive data with the socket.
| msg | : message to be received with the socket |
| flag | : receiving flag (BLOCK, NON_BLOCK) |
Definition at line 206 of file PZmqBackend.cpp.
References checkRecvStatus(), convertToRecvFlag(), and p_socket.
Referenced by recvData().
Here is the call graph for this function:
Here is the caller graph for this function:| PSendStatus::PSendStatus PZmqSocket::sendData | ( | const T & | data, |
| PSendFlag::PSendFlag | flag = PSendFlag::BLOCK ) |
Send data with the socket.
| data | : data to be sent with the socket |
| flag | : sending flag (BLOCK, NON_BLOCK) |
Definition at line 53 of file PZmqBackend_impl.h.
References sendMsg().
Here is the call graph for this function:| PSendStatus::PSendStatus PZmqSocket::sendMsg | ( | Message & | msg, |
| PSendFlag::PSendFlag | flag = PSendFlag::BLOCK ) |
Send data with the socket.
| msg | : message to be sent with the socket |
| flag | : sending flag (BLOCK, NON_BLOCK) |
Definition at line 175 of file PZmqBackend.cpp.
References checkSendStatus(), convertToSendFlag(), and p_socket.
Referenced by sendData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
ZMQ Socket.
Definition at line 63 of file PZmqBackend.h.
Referenced by close(), createClientSocket(), createServerSocket(), isConnected(), PZmqSocket(), recvMsg(), and sendMsg().