7#include <boost/interprocess/ipc/message_queue.hpp>
24 m_queue =
new message_queue( open_or_create,
name.c_str(), max_msg, max_size );
26 message_queue::remove(
name.c_str() );
39 if ( &other !=
this ) {
55 if ( other.m_count ) {
86static inline bool do_send( message_queue* mq,
const std::string& buf,
bool block )
92 mq->send( buf.data(), buf.size(), 0 );
94 send_ok = mq->try_send( buf.data(), buf.size(), 0 );
95 }
catch ( interprocess_exception& e ) {
112static inline std::string
do_receive( message_queue* mq,
bool block )
117 std::size_t recvd_size = 0;
118 unsigned int priority = 0;
131 return std::string( buf, recvd_size );
133 }
catch ( interprocess_exception& e ) {
virtual std::string try_receive()
void copy(const SharedQueue &other)
virtual bool try_send(const std::string &)
SharedQueue & operator=(const SharedQueue &other)
virtual std::string receive()
virtual bool send(const std::string &)
boost::interprocess::message_queue * m_queue
static std::string do_receive(message_queue *mq, bool block)
static const std::size_t MAX_MSG_SIZE
static bool do_send(message_queue *mq, const std::string &buf, bool block)