Пример #1
0
 /*! Returns true if there are no further parts.
  */
 inline bool last_part(socket_t& socket)
 {
     int64_t more;
     size_t more_size = sizeof(more);
     socket.getsockopt(ZMQ_RCVMORE, &more, &more_size);
     return  (more == 1) ? false : true;
 }
Пример #2
0
std::string _get_zmq_last_endpoint(socket_t & socket) {
    char buf[512];
    size_t buf_size = sizeof(buf);
    //int retval =
    socket.getsockopt(ZMQ_LAST_ENDPOINT, (void*)buf, &buf_size);
    // assert(retval == 0);
    // buf_size is modified.
    return std::string(buf, buf_size);
}