Types
ZPoller = object items*: seq[ZPollItem]
-
Poller type to simplify polling in ZMQ.
While, ZPoller can access the underlying socket to send / receive message, it must not close any socket. It is mandatory to manage the lifetimes of the polled sockets independently of the ZPoller - either manually or by using a ZConnection.
Procs
proc `=destroy`(poll: ZPoller) {....raises: [], tags: [], forbids: [].}
proc initZPoller(items: openArray[tuple[con: ZConnection, event: cshort]]): ZPoller {. ...raises: [], tags: [], forbids: [].}
- Init a ZPoller with each item its events flags
proc initZPoller(items: openArray[tuple[sock: ZSocket, event: cshort]]): ZPoller {. ...raises: [], tags: [], forbids: [].}
- Init a ZPoller with each item its events flags
proc initZPoller(items: openArray[ZConnection]; event: cshort): ZPoller {. ...raises: [], tags: [], forbids: [].}
- Init a ZPoller with all items on the same event
proc initZPoller(items: openArray[ZSocket]; event: cshort): ZPoller {. ...raises: [], tags: [], forbids: [].}
- Init a ZPoller with all items on the same event