Skip to content

How to correctly set receive timeout #562

@andrewdavidmackenzie

Description

@andrewdavidmackenzie

I am trying to fix a deprecation warning in code using cpzmq, related to setting socket opts and context ops.
I am not an experienced cpp programmer and unfamiliar with a lot of this :-(

I couldn't find docs or a code sample on how to set the received timeout

code was

  int timeout = 10000;
  response_puller.setsockopt(ZMQ_RCVTIMEO, &timeout, sizeof(timeout));

and now I am trying

  response_puller.set(zmq::sockopt::rcvtimeo, &timeout);

without much luck. All help appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions