zmq/bindings

Search:
Group by:

Types

ZContext = ptr TContext
ZContextOptions = enum
  IO_THREADS = 1, MAX_SOCKETS = 2, ZMQ_IPV6 = 42
zmq_event_t {.pure, final.} = object
  event*: uint16
  value*: int32
ZMsg {.pure, final.} = object
  priv*: array[zmq_msg_t_size("4.2.0"), uint8]
ZMsgOptions = enum
  MORE = 1, SRCFD = 2, SHARED = 3
ZPollItem {.pure, final.} = object
  socket*: ZSocket
  fd*: cint
  events*: cshort
  revents*: cshort
ZSendRecvOptions = enum
  NOFLAGS = 0, DONTWAIT = 1, SNDMORE = 2
ZSocket = ptr TSocket
ZSocketType = enum
  PAIR = 0, PUB = 1, SUB = 2, REQ = 3, REP = 4, DEALER = 5, ROUTER = 6,
  PULL = 7, PUSH = 8, XPUB = 9, XSUB = 10, STREAM = 11, SERVER = 12, CLIENT = 13
ZSockOptions = enum
  AFFINITY = 4, IDENTITY = 5, SUBSCRIBE = 6, UNSUBSCRIBE = 7, RATE = 8,
  RECOVERY_IVL = 9, SNDBUF = 11, RCVBUF = 12, RCVMORE = 13, FD = 14,
  EVENTS = 15, TYPE = 16, LINGER = 17, RECONNECT_IVL = 18, BACKLOG = 19,
  RECONNECT_IVL_MAX = 21, MAXMSGSIZE = 22, SNDHWM = 23, RCVHWM = 24,
  MULTICAST_HOPS = 25, RCVTIMEO = 27, SNDTIMEO = 28, LAST_ENDPOINT = 32,
  ROUTER_MANDATORY = 33, TCP_KEEPALIVE = 34, TCP_KEEPALIVE_CNT = 35,
  TCP_KEEPALIVE_IDLE = 36, TCP_KEEPALIVE_INTVL = 37, TCP_ACCEPT_FILTER = 38,
  IMMEDIATE = 39, XPUB_VERBOSE = 40, ROUTER_RAW = 41, IPV6 = 42, MECHANISM = 43,
  PLAIN_SERVER = 44, PLAIN_USERNAME = 45, PLAIN_PASSWORD = 46,
  CURVE_SERVER = 47, CURVE_PUBLICKEY = 48, CURVE_SECRETKEY = 49,
  CURVE_SERVERKEY = 50, PROBE_ROUTER = 51, REQ_CORRELATE = 52, REQ_RELAXED = 53,
  CONFLATE = 54, ZAP_DOMAIN = 55, ROUTER_HANDOVER = 56, TOS = 57,
  CONNECT_RID = 61, GSSAPI_SERVER = 62, GSSAPI_PRINCIPAL = 63,
  GSSAPI_SERVICE_PRINCIPAL = 64, GSSAPI_PLAINTEXT = 65, HANDSHAKE_IVL = 66,
  SOCKS_PROXY = 68, XPUB_NODROP = 69, BLOCKY = 70, XPUB_MANUAL = 71,
  XPUB_WELCOME_MSG = 72, STREAM_NOTIFY = 73, INVERT_MATCHING = 74,
  HEARTBEAT_IVL = 75, HEARTBEAT_TTL = 76, HEARTBEAT_TIMEOUT = 77,
  XPUB_VERBOSE_UNSUBSCRIBE = 78, CONNECT_TIMEOUT = 79,
  TCP_RETRANSMIT_TIMEOUT = 80, THREAD_SAFE = 81

Lets

ZMQ_EAGAIN {.importc: "EAGAIN", header: "errno.h".}: cint

Consts

EADDRINUSE = 156384717
EADDRNOTAVAIL = 156384718
EAFNOSUPPORT = 156384723
ECONNABORTED = 156384725
ECONNREFUSED = 156384719
ECONNRESET = 156384726
EFSM = 156384763
EHOSTUNREACH = 156384729
EINPROGRESS = 156384720
EMSGSIZE = 156384722
EMTHREAD = 156384766
ENETDOWN = 156384716
ENETRESET = 156384730
ENETUNREACH = 156384724
ENOBUFS = 156384715
ENOCOMPATPROTO = 156384764
ENOTCONN = 156384727
ENOTSOCK = 156384721
ENOTSUP = 156384713
EPROTONOSUPPORT = 156384714
ETERM = 156384765
ETIMEDOUT = 156384728
ZMQ_BLOCKY = 70
ZMQ_CLIENT = 13
ZMQ_CURVE = 2
ZMQ_EVENT_ALL = 2047
ZMQ_EVENTS = 15
ZMQ_FD = 14
ZMQ_LINGER = 17
ZMQ_MORE = 1
ZMQ_NULL = 0
ZMQ_PAIR = 0
ZMQ_PLAIN = 1
ZMQ_PUB = 1
ZMQ_PULL = 7
ZMQ_PUSH = 8
ZMQ_RATE = 8
ZMQ_RCVBUF = 12
ZMQ_RCVHWM = 24
ZMQ_REP = 4
ZMQ_REQ = 3
ZMQ_SERVER = 12
ZMQ_SNDBUF = 11
ZMQ_SNDHWM = 23
ZMQ_SRCFD = 2
ZMQ_STREAM = 11
ZMQ_SUB = 2
ZMQ_TOS = 57
ZMQ_TYPE = 16
ZMQ_VERSION = 40200
ZMQ_XPUB = 9
ZMQ_XREP = 6
ZMQ_XREQ = 5
ZMQ_XSUB = 10
zmqdll = "libzmq.so(.4|.5|)"

Procs

proc bindAddr(s: ZSocket; address: cstring): cint {.cdecl, importc: "zmq_bind",
    dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc close(s: ZSocket): cint {.cdecl, importc: "zmq_close", dynlib: zmqdll,
                               ...raises: [], tags: [], forbids: [].}
proc connect(s: ZSocket; address: cstring): cint {.cdecl,
    importc: "zmq_connect", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc ctx_destroy(context: ZContext): cint {.cdecl, importc: "zmq_ctx_destroy",
    dynlib: zmqdll, ...deprecated: "Legacy API. Use ctx_term instead", raises: [],
    tags: [], forbids: [].}
Deprecated: Legacy API. Use ctx_term instead
proc ctx_get(context: ZContext; option: cint): cint {.cdecl,
    importc: "zmq_ctx_get", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc ctx_new(): ZContext {.cdecl, importc: "zmq_ctx_new", dynlib: zmqdll,
                           ...raises: [], tags: [], forbids: [].}
proc ctx_set(context: ZContext; option: cint; optval: cint): cint {.cdecl,
    importc: "zmq_ctx_set", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc ctx_shutdown(ctx: ZContext): cint {.cdecl, importc: "zmq_ctx_shutdown",
    dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc ctx_term(context: ZContext): cint {.cdecl, importc: "zmq_ctx_term",
    dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc disconnect(s: ZSocket; address: cstring): cint {.cdecl,
    importc: "zmq_disconnect", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc errno(): cint {.cdecl, importc: "zmq_errno", dynlib: zmqdll, ...raises: [],
                     tags: [], forbids: [].}
proc getsockopt(s: ZSocket; option: ZSockOptions; optval: pointer;
                optvallen: ptr int): cint {.cdecl, importc: "zmq_getsockopt",
    dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc init(io_threads: cint): ZContext {.cdecl, importc: "zmq_init",
                                        dynlib: zmqdll, ...deprecated: "Legacy API. Use ctx_new instead",
                                        raises: [], tags: [], forbids: [].}
Deprecated: Legacy API. Use ctx_new instead
proc msg_close(msg: var ZMsg): cint {.cdecl, importc: "zmq_msg_close",
                                      dynlib: zmqdll, ...raises: [], tags: [],
                                      forbids: [].}
proc msg_copy(dest, src: var ZMsg): cint {.cdecl, importc: "zmq_msg_copy",
    dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc msg_data(msg: var ZMsg): pointer {.cdecl, importc: "zmq_msg_data",
                                        dynlib: zmqdll, ...raises: [], tags: [],
                                        forbids: [].}
proc msg_get(msg: var ZMsg; option: cint): cint {.cdecl, importc: "zmq_msg_get",
    dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc msg_init(msg: var ZMsg): cint {.cdecl, importc: "zmq_msg_init",
                                     dynlib: zmqdll, ...raises: [], tags: [],
                                     forbids: [].}
proc msg_init(msg: var ZMsg; data: cstring; size: int; ffn: TFreeFn;
              hint: pointer): cint {.cdecl, importc: "zmq_msg_init_data",
                                     dynlib: zmqdll, ...raises: [], tags: [],
                                     forbids: [].}
proc msg_init(msg: var ZMsg; size: int): cint {.cdecl,
    importc: "zmq_msg_init_size", dynlib: zmqdll, ...raises: [], tags: [],
    forbids: [].}
proc msg_more(msg: var ZMsg): cint {.cdecl, importc: "zmq_msg_more",
                                     dynlib: zmqdll, ...raises: [], tags: [],
                                     forbids: [].}
proc msg_move(dest, src: var ZMsg): cint {.cdecl, importc: "zmq_msg_move",
    dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc msg_recv(msg: var ZMsg; s: ZSocket; flags: cint): cint {.cdecl,
    importc: "zmq_msg_recv", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc msg_send(msg: var ZMsg; s: ZSocket; flags: cint): cint {.cdecl,
    importc: "zmq_msg_send", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc msg_set(msg: var ZMsg; option: cint; optval: cint): cint {.cdecl,
    importc: "zmq_msg_set", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc msg_size(msg: var ZMsg): int {.cdecl, importc: "zmq_msg_size",
                                    dynlib: zmqdll, ...raises: [], tags: [],
                                    forbids: [].}
proc poll(items: ptr UncheckedArray[ZPollItem]; nitems: cint; timeout: clong): cint {.
    cdecl, importc: "zmq_poll", dynlib: zmqdll, ...raises: [], tags: [],
    forbids: [].}
proc proxy(frontend: ZSocket; backend: ZSocket; capture: ZSocket): cint {.cdecl,
    importc: "zmq_proxy", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc proxy_steerable(frontend: ZSocket; backend: ZSocket; capture: ZSocket;
                     control: ZSocket): cint {.cdecl,
    importc: "zmq_proxy_steerable", dynlib: zmqdll, ...raises: [], tags: [],
    forbids: [].}
proc recv(s: ZSocket; buf: pointer; len: int; flags: cint): cint {.cdecl,
    importc: "zmq_recv", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc recvmsg(s: ZSocket; msg: var ZMsg; flags: cint): cint {.cdecl,
    importc: "zmq_recvmsg", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc send(s: ZSocket; buf: pointer; len: int; flags: cint): cint {.cdecl,
    importc: "zmq_send", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc send_const(s: ZSocket; buf: pointer; len: int; flags: cint): cint {.cdecl,
    importc: "zmq_send_const", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc sendmsg(s: ZSocket; msg: var ZMsg; flags: cint): cint {.cdecl,
    importc: "zmq_sendmsg", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc setsockopt(s: ZSocket; option: ZSockOptions; optval: pointer;
                optvallen: int): cint {.cdecl, importc: "zmq_setsockopt",
                                        dynlib: zmqdll, ...raises: [], tags: [],
                                        forbids: [].}
proc socket(context: ZContext; theType: cint): ZSocket {.cdecl,
    importc: "zmq_socket", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc socket_monitor(s: ZSocket; address: pointer; events: cint): cint {.cdecl,
    importc: "zmq_socket_monitor", dynlib: zmqdll, ...raises: [], tags: [],
    forbids: [].}
proc strerror(errnum: cint): cstring {.cdecl, importc: "zmq_strerror",
                                       dynlib: zmqdll, ...raises: [], tags: [],
                                       forbids: [].}
proc term(context: ZContext): cint {.cdecl, importc: "zmq_term", dynlib: zmqdll, ...deprecated: "Legacy API. Use ctx_term instead",
                                     raises: [], tags: [], forbids: [].}
Deprecated: Legacy API. Use ctx_term instead
proc unbind(s: ZSocket; address: cstring): cint {.cdecl, importc: "zmq_unbind",
    dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc version(major: var cint; minor: var cint; patch: var cint) {.cdecl,
    importc: "zmq_version", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc z85_decode(dest: ptr uint8; string: cstring): ptr uint8 {.cdecl,
    importc: "zmq_z85_decode", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}
proc z85_encode(dest: cstring; data: ptr uint8; size: int): cstring {.cdecl,
    importc: "zmq_z85_encode", dynlib: zmqdll, ...raises: [], tags: [], forbids: [].}

Templates

template ZMQ_MAKE_VERSION(major, minor, patch: untyped): untyped