Skip to content

Commit

Permalink
Class for multipart messaging
Browse files Browse the repository at this point in the history
This class handles multipart messaging. It is the C++ equivalent of zmsg.h, which is part of CZMQ (the high-level C binding). Furthermore, it is a major improvement compared to zmsg.hpp, which is part of the examples in the ØMQ Guide. Unnecessary copying is avoided by using move semantics to efficiently add/remove parts.
  • Loading branch information
K0n63n committed Apr 6, 2016
1 parent 68a7b09 commit e7c2093
Show file tree
Hide file tree
Showing 2 changed files with 473 additions and 0 deletions.
8 changes: 8 additions & 0 deletions zmq.hpp
Expand Up @@ -351,6 +351,14 @@ namespace zmq
return static_cast<T const*>( data() );
}

inline bool equal(const message_t* other) const ZMQ_NOTHROW
{
if (size() != other->size())
return false;
std::string a(data<char>(), size());
std::string b(other->data<char>(), other->size());
return a == b;
}

private:
// The underlying message
Expand Down

0 comments on commit e7c2093

Please sign in to comment.