[zeromq-dev] How to make a client die if a server crashes.

Jonathan Bishop jbishop.rwc at gmail.com
Thu Feb 12 02:07:05 CET 2015


Hi,

I am integrating 0MQ into an existing system. Previously I was using unix
sockets and I would detect POLLHUP | POLLERR | POLLNVAL on a client when
the server died. I would do this using poll()...

  struct pollfd pfd;
  pfd.fd = fd;
  pfd.events = 0;
  pfd.revents = 0;
  rc = poll(&pfd, 1, 0);
  assert(rc >= 0 || errno == EINTR);
  if (pfd.revents & (POLLHUP | POLLERR | POLLNVAL))
      <shutdown somehow>


Tried the equivalent code in 0MQ and ZMQ_POLLERR but no luck. Can someone
help me?

Thanks,

Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150211/01916534/attachment.htm>


More information about the zeromq-dev mailing list