|
FairMQ
1.2.3
C++ Message Passing Framework
|
Public Member Functions | |
| FairMQChannel () | |
| Default constructor. | |
| FairMQChannel (const std::string &type, const std::string &method, const std::string &address) | |
| FairMQChannel (const std::string &name, const std::string &type, std::shared_ptr< FairMQTransportFactory > factory) | |
| FairMQChannel (const FairMQChannel &) | |
| Copy Constructor. | |
| FairMQChannel & | operator= (const FairMQChannel &) |
| Assignment operator. | |
| virtual | ~FairMQChannel () |
| Default destructor. | |
| FairMQSocket const & | GetSocket () const |
| auto | Bind (const std::string &address) -> bool |
| auto | Connect (const std::string &address) -> void |
| std::string | GetChannelName () const |
| std::string | GetChannelPrefix () const |
| std::string | GetChannelIndex () const |
| std::string | GetType () const |
| std::string | GetMethod () const |
| std::string | GetAddress () const |
| std::string | GetTransportName () const |
| int | GetSndBufSize () const |
| int | GetRcvBufSize () const |
| int | GetSndKernelSize () const |
| int | GetRcvKernelSize () const |
| int | GetRateLogging () const |
| void | UpdateType (const std::string &type) |
| void | UpdateMethod (const std::string &method) |
| void | UpdateAddress (const std::string &address) |
| void | UpdateTransport (const std::string &transport) |
| void | UpdateSndBufSize (const int sndBufSize) |
| void | UpdateRcvBufSize (const int rcvBufSize) |
| void | UpdateSndKernelSize (const int sndKernelSize) |
| void | UpdateRcvKernelSize (const int rcvKernelSize) |
| void | UpdateRateLogging (const int rateLogging) |
| void | UpdateChannelName (const std::string &name) |
| bool | IsValid () const |
| bool | ValidateChannel () |
| void | ResetChannel () |
| Resets the channel (requires validation to be used again). | |
| int | Send (std::unique_ptr< FairMQMessage > &msg) const |
| int | Receive (std::unique_ptr< FairMQMessage > &msg) const |
| int | Send (std::unique_ptr< FairMQMessage > &msg, int sndTimeoutInMs) const |
| int | Receive (std::unique_ptr< FairMQMessage > &msg, int rcvTimeoutInMs) const |
| int | SendAsync (std::unique_ptr< FairMQMessage > &msg) const |
| int | ReceiveAsync (std::unique_ptr< FairMQMessage > &msg) const |
| int64_t | Send (std::vector< std::unique_ptr< FairMQMessage >> &msgVec) const |
| int64_t | Receive (std::vector< std::unique_ptr< FairMQMessage >> &msgVec) const |
| int64_t | Send (std::vector< std::unique_ptr< FairMQMessage >> &msgVec, int sndTimeoutInMs) const |
| int64_t | Receive (std::vector< std::unique_ptr< FairMQMessage >> &msgVec, int rcvTimeoutInMs) const |
| int64_t | SendAsync (std::vector< std::unique_ptr< FairMQMessage >> &msgVec) const |
| int64_t | ReceiveAsync (std::vector< std::unique_ptr< FairMQMessage >> &msgVec) const |
| int64_t | Send (FairMQParts &parts) const |
| int64_t | Receive (FairMQParts &parts) const |
| int64_t | Send (FairMQParts &parts, int sndTimeoutInMs) const |
| int64_t | Receive (FairMQParts &parts, int rcvTimeoutInMs) const |
| int64_t | SendAsync (FairMQParts &parts) const |
| int64_t | ReceiveAsync (FairMQParts &parts) const |
| unsigned long | GetBytesTx () const |
| unsigned long | GetBytesRx () const |
| unsigned long | GetMessagesTx () const |
| unsigned long | GetMessagesRx () const |
| auto | Transport () const -> const FairMQTransportFactory * |
| template<typename... Args> | |
| FairMQMessagePtr | NewMessage (Args &&... args) const |
| template<typename T > | |
| FairMQMessagePtr | NewSimpleMessage (const T &data) const |
| template<typename T > | |
| FairMQMessagePtr | NewStaticMessage (const T &data) const |
Friends | |
| class | FairMQDevice |
| FairMQChannel::FairMQChannel | ( | const std::string & | type, |
| const std::string & | method, | ||
| const std::string & | address | ||
| ) |
Constructor
| type | Socket type (push/pull/pub/sub/spub/xsub/pair/req/rep/dealer/router/) |
| method | Socket method (bind/connect) |
| address | Network address to bind/connect to (e.g. "tcp://127.0.0.1:5555" or "ipc://abc") |
| FairMQChannel::FairMQChannel | ( | const std::string & | name, |
| const std::string & | type, | ||
| std::shared_ptr< FairMQTransportFactory > | factory | ||
| ) |
Constructor
| name | Channel name |
| type | Socket type (push/pull/pub/sub/spub/xsub/pair/req/rep/dealer/router/) |
| factory | TransportFactory |
| string FairMQChannel::GetAddress | ( | ) | const |
Get socket address (e.g. "tcp://127.0.0.1:5555" or "ipc://abc")
| string FairMQChannel::GetChannelIndex | ( | ) | const |
Get channel index
| string FairMQChannel::GetChannelName | ( | ) | const |
Get channel name
| string FairMQChannel::GetChannelPrefix | ( | ) | const |
Get channel prefix
| string FairMQChannel::GetMethod | ( | ) | const |
Get socket method
| int FairMQChannel::GetRateLogging | ( | ) | const |
Get socket rate logging interval (in seconds)
| int FairMQChannel::GetRcvBufSize | ( | ) | const |
Get socket receive buffer size (in number of messages)
| int FairMQChannel::GetRcvKernelSize | ( | ) | const |
Get socket kernel transmit receive buffer size (in bytes)
| int FairMQChannel::GetSndBufSize | ( | ) | const |
Get socket send buffer size (in number of messages)
| int FairMQChannel::GetSndKernelSize | ( | ) | const |
Get socket kernel transmit send buffer size (in bytes)
| string FairMQChannel::GetTransportName | ( | ) | const |
Get channel transport ("default", "zeromq", "nanomsg" or "shmem")
| string FairMQChannel::GetType | ( | ) | const |
Get socket type
| bool FairMQChannel::IsValid | ( | ) | const |
Checks if the configured channel settings are valid (checks the validity parameter, without running full validation (as oposed to ValidateChannel()))
| int FairMQChannel::Receive | ( | std::unique_ptr< FairMQMessage > & | msg, |
| int | rcvTimeoutInMs | ||
| ) | const |
Receives a message from the socket queue.
Receive method attempts to receive a message from the input queue. If the queue is empty the method blocks.
| msg | Constant reference of unique_ptr to a FairMQMessage |
| int64_t FairMQChannel::Receive | ( | std::vector< std::unique_ptr< FairMQMessage >> & | msgVec, |
| int | rcvTimeoutInMs | ||
| ) | const |
Receive a vector of messages
| msgVec | message vector reference |
| int FairMQChannel::ReceiveAsync | ( | std::unique_ptr< FairMQMessage > & | msg | ) | const |
Receives a message in non-blocking mode.
| msg | Constant reference of unique_ptr to a FairMQMessage |
| int64_t FairMQChannel::ReceiveAsync | ( | std::vector< std::unique_ptr< FairMQMessage >> & | msgVec | ) | const |
Receives a vector of messages in non-blocking mode.
| msgVec | message vector reference |
| int FairMQChannel::Send | ( | std::unique_ptr< FairMQMessage > & | msg, |
| int | sndTimeoutInMs | ||
| ) | const |
Sends a message to the socket queue.
Send method attempts to send a message by putting it in the output queue. If the queue is full or queueing is not possible for some other reason (e.g. no peers connected for a binding socket), the method blocks.
| msg | Constant reference of unique_ptr to a FairMQMessage |
| int64_t FairMQChannel::Send | ( | std::vector< std::unique_ptr< FairMQMessage >> & | msgVec, |
| int | sndTimeoutInMs | ||
| ) | const |
Send a vector of messages
| msgVec | message vector reference |
| int FairMQChannel::SendAsync | ( | std::unique_ptr< FairMQMessage > & | msg | ) | const |
Sends a message in non-blocking mode.
SendAsync method attempts to send a message without blocking by putting it in the queue.
| msg | Constant reference of unique_ptr to a FairMQMessage |
| int64_t FairMQChannel::SendAsync | ( | std::vector< std::unique_ptr< FairMQMessage >> & | msgVec | ) | const |
Sends a vector of message in non-blocking mode.
SendAsync method attempts to send a vector of messages without blocking by putting it them the queue.
| msgVec | message vector reference |
| void FairMQChannel::UpdateAddress | ( | const std::string & | address | ) |
Set socket address
| Socket | address (e.g. "tcp://127.0.0.1:5555" or "ipc://abc") |
| void FairMQChannel::UpdateChannelName | ( | const std::string & | name | ) |
Set channel name
| name | Arbitrary channel name |
| void FairMQChannel::UpdateMethod | ( | const std::string & | method | ) |
Set socket method
| method | Socket method (bind/connect) |
| void FairMQChannel::UpdateRateLogging | ( | const int | rateLogging | ) |
Set socket rate logging interval (in seconds)
| rateLogging | Socket rate logging interval (in seconds) |
| void FairMQChannel::UpdateRcvBufSize | ( | const int | rcvBufSize | ) |
Set socket receive buffer size
| rcvBufSize | Socket receive buffer size (in number of messages) |
| void FairMQChannel::UpdateRcvKernelSize | ( | const int | rcvKernelSize | ) |
Set socket kernel transmit receive buffer size (in bytes)
| rcvKernelSize | Socket receive buffer size (in bytes) |
| void FairMQChannel::UpdateSndBufSize | ( | const int | sndBufSize | ) |
Set socket send buffer size
| sndBufSize | Socket send buffer size (in number of messages) |
| void FairMQChannel::UpdateSndKernelSize | ( | const int | sndKernelSize | ) |
Set socket kernel transmit send buffer size (in bytes)
| sndKernelSize | Socket send buffer size (in bytes) |
| void FairMQChannel::UpdateTransport | ( | const std::string & | transport | ) |
Set channel transport
| transport | transport string ("default", "zeromq", "nanomsg" or "shmem") |
| void FairMQChannel::UpdateType | ( | const std::string & | type | ) |
Set socket type
| type | Socket type (push/pull/pub/sub/spub/xsub/pair/req/rep/dealer/router/) |
| bool FairMQChannel::ValidateChannel | ( | ) |
Validates channel configuration
1.8.13