On this page:
context?
socket?
socket-type?
option-name?
send/ recv-flags?
poll-status?
msg?
_ msg
poll-item?
make-poll-item
poll-item-revents
context
context-close!
msg-init!
msg-init-size!
msg-close!
msg-data-pointer
msg-size
msg-data
msg-copy!
msg-move!
socket
socket-close!
socket-option
set-socket-option!
socket-bind!
socket-connect!
socket-send-msg!
socket-send!
socket-recv-msg!
socket-recv!
poll!
zmq-version

1 API

 (require (planet jaymccarthy/zeromq:2:1/zmq))
(context? x)  boolean?
  x : any/c
Determines if x is a pointer to a ZeroMQ context.
(socket? x)  boolean?
  x : any/c
Determines if x is a pointer to a ZeroMQ socket.
socket-type? : contract?
A contract for the symbols '(PAIR PUB SUB REQ REP XREQ XREP PULL PUSH)
option-name? : contract?
A contract for the symbols '(HWM SWAP AFFINITY IDENTITY SUBSCRIBE UNSUBSCRIBE RATE RECOVERY_IVL MCAST_LOOP SNDBUF RCVBUF RCVMORE)
send/recv-flags? : contract?
A contract for any symbol in '(NOBLOCK SNDMORE) or any list of those symbols.
poll-status? : contract?
A contract for any symbol in '(POLLIN POLLOUT POLLERR) or any list of those symbols.
(msg? x)  boolean?
  x : any/c
Determines if x is a ZeroMQ message.
_msg : ctype?
A ctype for ZeroMQ messages, suitable for using with malloc.
(poll-item? x)  boolean?
  x : any/c
Determines if x is a ZeroMQ poll item.
(make-poll-item socket fd events revents)  poll-item?
  socket : socket?
  fd : exact-nonnegative-integer?
  events : poll-status?
  revents : poll-status?
Constructs a poll item for using with poll!.
(poll-item-revents pi)  poll-status?
  pi : poll-item?
Extracts the revents field from a poll item structure.
(context io_threads)  context?
  io_threads : exact-nonnegative-integer?
An FFI binding for zmq_init.
(context-close! context)  void
  context : context?
An FFI binding for zmq_term.
(msg-init! msg)  void
  msg : msg?
An FFI binding for zmq_msg_init.
(msg-init-size! msg size)  void
  msg : msg?
  size : exact-nonnegative-integer?
An FFI binding for zmq_msg_init_size.
(msg-close! msg)  void
  msg : msg?
An FFI binding for zmq_msg_close.
(msg-data-pointer msg)  cpointer?
  msg : msg?
An FFI binding for zmq_msg_data.
(msg-size msg)  exact-nonnegative-integer?
  msg : msg?
An FFI binding for zmq_msg_size.
(msg-data msg)  bytes?
  msg : msg?
Creates a sized byte string from a message’s data.
(msg-copy! dest src)  void
  dest : msg?
  src : msg?
An FFI binding for zmq_msg_copy.
(msg-move! dest src)  void
  dest : msg?
  src : msg?
An FFI binding for zmq_msg_move.
(socket ctxt type)  socket?
  ctxt : context?
  type : socket-type?
An FFI binding for zmq_socket.
(socket-close! socket)  void
  socket : socket?
An FFI binding for zmq_close.
(socket-option socket option-name)
  
(or/c
 
 
 
 
 
 
boolean?
 
exact-integer?
 
exact-nonnegative-integer?                 bytes?)
  socket : socket?
  option-name : option-name?
Extracts the given option’s value from the socket, similar to zmq_getsockopt.
(set-socket-option! socket    
  option-name    
  option-value)  void
  socket : socket?
  option-name : option-name?
  option-value : 
(or/c
 
 
 
 
 
 
exact-nonnegative-integer?
 
exact-integer?
 
boolean?                                                     bytes?)
Sets the given option’s value from the socket, similar to zmq_setsockopt.
(socket-bind! socket endpoint)  void
  socket : socket?
  endpoint : string?
An FFI binding for zmq_bind.
(socket-connect! socket endpoint)  void
  socket : socket?
  endpoint : string?
An FFI binding for zmq_connect.
(socket-send-msg! socket msg flags)  void
  socket : socket?
  msg : msg?
  flags : send/recv-flags?
An FFI binding for zmq_send.
(socket-send! socket bytes)  void
  socket : socket?
  bytes : bytes?
Sends a byte string on a socket using socket-send-msg! and a temporary message.
(socket-recv-msg! socket msg flags)  void
  socket : socket?
  msg : msg?
  flags : send/recv-flags?
An FFI binding for zmq_recv.
(socket-recv! socket)  bytes?
  socket : socket?
Receives a byte string on a socket using socket-recv-msg! and a temporary message.
(poll! items timeout)  void
  items : (vectorof poll-item?)
  timeout : exact-integer?
An FFI binding for zmq_poll.
An FFI binding for zmq_version.