Overview Tutorial API reference Examples Build Download ZmqMessage 0.1 - 21 Oct 2011

ZmqMessage::Outgoing< RoutingPolicy > Class Template Reference

Represents outgoing message to be sent. More...

#include <ZmqMessage.hpp>

Inheritance diagram for ZmqMessage::Outgoing< RoutingPolicy >:

ZmqMessage::Sink ZmqMessage::Private::NonCopyable List of all members.

Public Types

typedef RoutingPolicy RoutingPolicyType

Public Member Functions

 Outgoing (zmq::socket_t &dst, unsigned options)
 Outgoing (OutOptions out_opts)
template<typename InRoutingPolicy>
 Outgoing (zmq::socket_t &dst, Incoming< InRoutingPolicy > &incoming, unsigned options) throw (ZmqErrorType)
template<typename InRoutingPolicy>
 Outgoing (OutOptions out_opts, Incoming< InRoutingPolicy > &incoming) throw (ZmqErrorType)
 Outgoing (zmq::socket_t &dst, Multipart &incoming, unsigned options) throw (ZmqErrorType)
 Outgoing (OutOptions out_opts, Multipart &incoming) throw (ZmqErrorType)
template<>
void send_routing (MsgPtrVec *routing) throw(ZmqErrorType)
template<>
void send_routing (MsgPtrVec *routing) throw(ZmqErrorType)

Detailed Description

template<class RoutingPolicy>
class ZmqMessage::Outgoing< RoutingPolicy >

Represents outgoing message to be sent.

All message parts are either sent (if possible) OR become exclusively owned by this object, if sending of parts immediately would block and Outgoing created with OutOptions.NONBLOCK and OutOptions.CACHE_ON_BLOCK. That Multipart is detachable (ownership may be yielded, see detach() method). Outgoing message may be linked with corresponding incoming message (when Incoming reference given to constructor). In this case the ownership of message parts may be transferred from incoming to outgoing message (by operator << on message_t), to avoid copying.

Examples:

zasync.cpp, zbisort.cpp, zqueue.cpp, zserialize.cpp, and zsort.cpp.


Member Typedef Documentation

template<class RoutingPolicy>
typedef RoutingPolicy ZmqMessage::Outgoing< RoutingPolicy >::RoutingPolicyType

Routing policy used for sending multipart message


Constructor & Destructor Documentation

template<class RoutingPolicy>
ZmqMessage::Outgoing< RoutingPolicy >::Outgoing ( zmq::socket_t &  dst,
unsigned  options 
) [inline]

template<class RoutingPolicy>
ZmqMessage::Outgoing< RoutingPolicy >::Outgoing ( OutOptions  out_opts  )  [inline, explicit]

template<class RoutingPolicy>
template<typename InRoutingPolicy>
ZmqMessage::Outgoing< RoutingPolicy >::Outgoing ( zmq::socket_t &  dst,
Incoming< InRoutingPolicy > &  incoming,
unsigned  options 
) throw (ZmqErrorType) [inline]

Outgoing message is a response to the given Incoming message, so we resend Incoming's routing first.

template<class RoutingPolicy>
template<typename InRoutingPolicy>
ZmqMessage::Outgoing< RoutingPolicy >::Outgoing ( OutOptions  out_opts,
Incoming< InRoutingPolicy > &  incoming 
) throw (ZmqErrorType) [inline]

Outgoing message is a response to the given Incoming message, so we resend Incoming's routing first.

template<class RoutingPolicy>
ZmqMessage::Outgoing< RoutingPolicy >::Outgoing ( zmq::socket_t &  dst,
Multipart incoming,
unsigned  options 
) throw (ZmqErrorType) [inline]

Outgoing message is NOT a response to the given Incoming message, so we send normal routing.

template<class RoutingPolicy>
ZmqMessage::Outgoing< RoutingPolicy >::Outgoing ( OutOptions  out_opts,
Multipart incoming 
) throw (ZmqErrorType) [inline]

Outgoing message is NOT a response to the given Incoming message, so we send normal routing.


Member Function Documentation

template<>
void ZmqMessage::Outgoing< XRouting >::send_routing ( MsgPtrVec routing  )  throw(ZmqErrorType)

template<>
void ZmqMessage::Outgoing< SimpleRouting >::send_routing ( MsgPtrVec routing  )  throw(ZmqErrorType)


The documentation for this class was generated from the following file:
ZmqMessage 0.1 — open source software, support@zmqmessage.org