This is the pzmq Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:22:04 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
pzmq
ZeroMQ 3.2+ bindings.
Orivej Desh <orivej@gmx.fr>
Unlicense
cffi
(system).
package.lisp
(file).
grovel.lisp
(file).
c-api.lisp
(file).
lisp-api.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
pzmq/c-api.lisp
grovel.lisp
(file).
pzmq
(system).
*restart-interrupted-calls*
(special variable).
bind
(function).
c-error
(condition).
close
(function).
connect
(function).
ctx-destroy
(function).
ctx-get
(function).
ctx-new
(function).
ctx-set
(function).
ctx-shutdown
(function).
ctx-term
(function).
curve-keypair
(function).
device
(function).
eaddrinuse
(condition).
eaddrnotavail
(condition).
eagain
(condition).
efault
(condition).
efsm
(condition).
ehostunreach
(condition).
eintr
(condition).
einval
(condition).
emfile
(condition).
emthread
(condition).
enocompatproto
(condition).
enodev
(condition).
enoent
(condition).
enomem
(condition).
enotsock
(condition).
enotsup
(condition).
eprotonosupport
(condition).
errno
(function).
eterm
(condition).
getsockopt
(function).
libzmq-error
(condition).
msg-close
(function).
msg-copy
(function).
msg-data
(function).
msg-get
(function).
msg-init
(function).
msg-init-data
(function).
msg-init-size
(function).
msg-more
(function).
msg-move
(function).
msg-recv
(function).
msg-send
(function).
msg-set
(function).
msg-size
(function).
poll
(function).
proxy
(function).
send
(function).
setsockopt
(function).
socket
(function).
strerror
(function).
version
(function).
%bind
(function).
%close
(function).
%connect
(function).
%ctx-destroy
(function).
%ctx-get
(function).
%ctx-set
(function).
%ctx-shutdown
(function).
%ctx-term
(function).
%curve-keypair
(function).
%device
(function).
%errno
(function).
%getsockopt
(function).
%msg-close
(function).
%msg-copy
(function).
%msg-get
(function).
%msg-init
(function).
%msg-init-data
(function).
%msg-init-size
(function).
%msg-more
(function).
%msg-move
(function).
%msg-recv
(function).
%msg-send
(function).
%msg-set
(function).
%poll
(function).
%proxy
(function).
%recv
(function).
%send
(function).
%setsockopt
(function).
%socket
(function).
%strerror
(function).
%version
(function).
+io-threads+
(constant).
+max-sockets+
(constant).
+more+
(constant).
c-error-errno
(reader method).
c-error-keyword
(function).
defcfun*
(macro).
define-conditions
(macro).
libzmq-error-condition
(function).
with-c-error-check
(macro).
z85-decode
(function).
z85-encode
(function).
pzmq/lisp-api.lisp
c-api.lisp
(file).
pzmq
(system).
*default-context*
(special variable).
recv-octets
(function).
recv-string
(function).
revents
(function).
with-context
(macro).
with-message
(macro).
with-messages
(macro).
with-poll-items
(macro).
with-socket
(macro).
with-sockets
(macro).
Packages are listed by definition order.
pzmq
ZeroMQ 3.2+ bindings.
Consult @a[http://api.zeromq.org/4-0:zmq]{official C API reference} first.
@begin[Top-level API]{section}
@aboutfun{with-socket}
@aboutfun{with-sockets}
@aboutfun{bind}
@aboutfun{connect}
@aboutfun{recv-string}
@aboutfun{recv-octets}
@aboutfun{send}
@aboutfun{with-poll-items}
@aboutfun{poll}
@aboutfun{revents}
@aboutfun{curve-keypair}
@end{section}
@begin[Middle-level API]{section}
@aboutfun{with-context}
@aboutfun{with-message}
@end{section}
@begin[Low-level API]{section}
@aboutfun{ctx-new}
@aboutfun{ctx-set}
@aboutfun{ctx-get}
@aboutfun{ctx-destroy}
@aboutfun{error}
@aboutfun{strerror}
@aboutfun{version}
@end{section}
@section[Other]{}
cffi
.
common-lisp
.
*default-context*
(special variable).
*restart-interrupted-calls*
(special variable).
bind
(function).
c-error
(condition).
close
(function).
connect
(function).
ctx-destroy
(function).
ctx-get
(function).
ctx-new
(function).
ctx-set
(function).
ctx-shutdown
(function).
ctx-term
(function).
curve-keypair
(function).
device
(function).
eaddrinuse
(condition).
eaddrnotavail
(condition).
eagain
(condition).
efault
(condition).
efsm
(condition).
ehostunreach
(condition).
eintr
(condition).
einval
(condition).
emfile
(condition).
emthread
(condition).
enocompatproto
(condition).
enodev
(condition).
enoent
(condition).
enomem
(condition).
enotsock
(condition).
enotsup
(condition).
eprotonosupport
(condition).
errno
(function).
eterm
(condition).
getsockopt
(function).
libzmq-error
(condition).
msg-close
(function).
msg-copy
(function).
msg-data
(function).
msg-get
(function).
msg-init
(function).
msg-init-data
(function).
msg-init-size
(function).
msg-more
(function).
msg-move
(function).
msg-recv
(function).
msg-send
(function).
msg-set
(function).
msg-size
(function).
poll
(function).
proxy
(function).
recv-octets
(function).
recv-string
(function).
revents
(function).
send
(function).
setsockopt
(function).
socket
(function).
strerror
(function).
version
(function).
with-context
(macro).
with-message
(macro).
with-messages
(macro).
with-poll-items
(macro).
with-socket
(macro).
with-sockets
(macro).
%bind
(function).
%close
(function).
%connect
(function).
%ctx-destroy
(function).
%ctx-get
(function).
%ctx-set
(function).
%ctx-shutdown
(function).
%ctx-term
(function).
%curve-keypair
(function).
%device
(function).
%errno
(function).
%getsockopt
(function).
%msg-close
(function).
%msg-copy
(function).
%msg-get
(function).
%msg-init
(function).
%msg-init-data
(function).
%msg-init-size
(function).
%msg-more
(function).
%msg-move
(function).
%msg-recv
(function).
%msg-send
(function).
%msg-set
(function).
%poll
(function).
%proxy
(function).
%recv
(function).
%send
(function).
%setsockopt
(function).
%socket
(function).
%strerror
(function).
%version
(function).
+io-threads+
(constant).
+max-sockets+
(constant).
+more+
(constant).
c-error-errno
(generic reader).
c-error-keyword
(function).
defcfun*
(macro).
define-conditions
(macro).
libzmq-error-condition
(function).
with-c-error-check
(macro).
z85-decode
(function).
z85-encode
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Implicit context from @fun{WITH-CONTEXT} for @fun{WITH-SOCKET}.
pzmq
.
When blocking ZMQ call returns with EINTR automatically retry it,
instead of signaling a condition.
Explanation: Every time garbage collection happens in implementation
that use signals to stop threads (like SBCL), every ZMQ blocking
ZMQ call, will error out with EINTR on every GC.
When this variable is non-NIL, PZMQ will retry the call, as if
you had selected CONTINUE restart.
Note that EINTR will also be returned by any other interruptions
such as attaching a debugger to a thread, or pressing Ctrl-C.
If you would like to terminate your ZMQ call in these cases, then
rebind *RESTART-INTERRUPTED-CALLS*, and have a HANDLER-BIND set it to
NIL on these special cases.
Then at a lower level, ignore EINTR errors. It is important to use HANDLER-BIND and not HANDLER-CASE, because we want the ZMQ function being interrupted to return EINTR, performing any necessary cleanups, using HANDLER-CASE or using non-local exit from HANDLER-BIND will accomplish its task, but without letting ZMQ call properly cleanup after itself.
pzmq
.
Initialize and terminate ZMQ context around body.
Use NIL for @em{anonymous context}, stored in @variable{*DEFAULT-CONTEXT*}.
Omit @fun{WITH-CONTEXT} altogether, and @fun{WITH-SOCKET} will establish it by
itself.
Note: unwind-protected @fun{CTX-TERM} will not return until all governed
sockets have sent all queued messages, unless they limited their wait time
with :LINGER socket parameter.
@arg[name-and-options]{name | (name options)}
@arg[name]{name | NIL}
@arg[options]{:io-threads INT :max-sockets INT; as per @fun{CTX-SET}}
pzmq
.
Initialize and free ZMQ message around body.
pzmq
.
Prepare POLLITEM array in NAME.
Without parentheses, an item indicates subscription to both :pollin and :pollout.
@arg[items]{(item ...)}
@arg[item]{name | (name [:pollin] [:pollout])}
pzmq
.
Initialize and close ZMQ socket around body. Type is one of the types accepted
by @fun{SOCKET}. Options are passed to @fun{SETSOCKOPT} one by one.
When TYPE is :SUB, and :SUBSCRIBE is not given in OPTIONS, imply subscribe to all.
If this is undesirable, provide :SUBSCRIBE NIL.
When context is not specified, it either comes from surrounding @fun{WITH-CONTEXT}
or @fun{WITH-SOCKET} in @variable{*DEFAULT-CONTEXT*}, or is established by this
@fun{WITH-SOCKET} and stored in @variable{*DEFAULT-CONTEXT*} for the timespan of
this block.
@arg[name-and-context]{name | (name context)}
@arg[type-and-options]{type | (type :option1 value1 :option2 value2 ...)}
pzmq
.
Nest multiple sockets.
pzmq
.
Accept connections on a socket.
Only one socket may be bound to a particular endpoint. Bound socket may receive messages sent before it was bound. @arg[endpoint]{"transport://address"}
pzmq
.
Connect a socket.
Many sockets may connect to the same endpoint.
Connected socket may not receive messages sent before it was bound.
@arg[endpoint]{"transport://address"}
pzmq
.
Destroy a ØMQ context. Deprecated synonym for @see{CTX-TERM}
pzmq
.
@arg[option-name]{:io-threads | :max-threads} @see{CTX-SET}
@return{integer}
Get context options.
pzmq
.
Shutdown a ØMQ context. Non-blocking. Optional before @see{CTX-TERM}
pzmq
.
Generates and returns a CurveZMQ keypair.
@return{(VALUES PUBLIC-KEY SECRET-KEY), both of type (VECTOR (UNSIGNED-BYTE 8) 32).}
pzmq
.
Start built-in ØMQ device in the calling thread. Never returns unless interrupted.
Deprecated by @fun{PROXY}
@arg[device]{:streamer | :forwarder | :queue}
@arg[frontend, backend]{socket}
pzmq
.
Retrieve value of errno for the calling thread. @see{STRERROR}
pzmq
.
Get ØMQ socket options.
@arg[option-name]{keyword}
@return{integer, or string for :identity and :last-endpoint}
pzmq
.
Release ØMQ message.
Low-level API. Consider using @fun{WITH-MESSAGE}.
pzmq
.
Get message property. The only defined property is :more; equivalent to @fun{MSG-MORE}. @arg[property]{:more}
pzmq
.
Initialise empty ØMQ message.
Low-level API. Consider using @fun{WITH-MESSAGE}.
@see{MSG-CLOSE}
@see{MSG-INIT-SIZE}
@see{MSG-INIT-DATA}
pzmq
.
Initialise ØMQ message from a supplied buffer.
@see{MSG-CLOSE}
@see{MSG-INIT-SIZE}
@see{MSG-INIT-DATA}
pzmq
.
Initialise ØMQ message of a specified size.
@see{MSG-CLOSE}
@see{MSG-INIT}
@see{MSG-INIT-DATA}
pzmq
.
Indicate if there are more message parts to receive.
pzmq
.
Receive a message part from a socket.
pzmq
.
Send a message part on a socket.
pzmq
.
Set message property. No setable properties defined yet.
pzmq
.
Input/output multiplexing on ZeroMQ sockets. @arg[items]{Poll items prepared with @fun{WITH-POLL-ITEMS}} @arg[timeout]{-1 : wait indefinitely; N : wait N milliseconds} @return{The number of ready items.}
pzmq
.
Start built-in ØMQ proxy in the current application thread. @arg[frontend, backend, capture]{socket}
pzmq
.
Receive a message part from a socket as an octet vector.
@return{A (vector (unsigned-byte 8)) as the primary value, and the value
of the socket option :rcvmore as the secondary value.}
pzmq
.
Receive a message part from a socket as a string.
@return{A string as the primary value, and the value of the socket
option :rcvmore as the secondary value.}
pzmq
.
Return a list of events - :pollin, :pollout or both - that happened to an
indicated item, counting from 0.
@return{([:pollin] [:pollout])}
pzmq
.
Send a message part on a socket.
@arg[buf]{string, or foreign byte array, or byte array, or nil for an empty message} @arg[len]{ignored, or array size}
pzmq
.
Set ØMQ socket options.
Boolean options accept generalized Lisp booleans.
Binary options are supported either as strings or UB8 vectors.
pzmq
.
Create ØMQ socket.
@arg[type]{:pair | :pub | :sub | :req | :rep | :dealer | :router | :pull | :push | :xpub | :xsub | :stream}
pzmq
.
@return{(major minor patch)}
Report ØMQ library version.
pzmq
.
Simple wrapper for DEFCFUN and DEFUN around WITH-POSIX-ERROR-CHECK.
pzmq
.
Accept connections on a socket.
Only one socket may be bound to a particular endpoint. Bound socket may receive messages sent before it was bound. @arg[endpoint]{"transport://address"}
pzmq
.
Connect a socket.
Many sockets may connect to the same endpoint.
Connected socket may not receive messages sent before it was bound.
@arg[endpoint]{"transport://address"}
pzmq
.
Destroy a ØMQ context. Deprecated synonym for @see{CTX-TERM}
pzmq
.
Shutdown a ØMQ context. Non-blocking. Optional before @see{CTX-TERM}
pzmq
.
Start built-in ØMQ device in the calling thread. Never returns unless interrupted.
Deprecated by @fun{PROXY}
@arg[device]{:streamer | :forwarder | :queue}
@arg[frontend, backend]{socket}
pzmq
.
Get ØMQ socket options.
pzmq
.
Release ØMQ message.
Low-level API. Consider using @fun{WITH-MESSAGE}.
pzmq
.
Initialise empty ØMQ message.
Low-level API. Consider using @fun{WITH-MESSAGE}.
@see{MSG-CLOSE}
@see{MSG-INIT-SIZE}
@see{MSG-INIT-DATA}
pzmq
.
Initialise ØMQ message from a supplied buffer.
pzmq
.
Initialise ØMQ message of a specified size.
@see{MSG-CLOSE}
@see{MSG-INIT}
@see{MSG-INIT-DATA}
pzmq
.
indicate if there are more message parts to receive.
pzmq
.
Set message property. No setable properties defined yet.
pzmq
.
Start built-in ØMQ proxy in the current application thread. @arg[frontend, backend, capture]{socket}
pzmq
.
Set ØMQ socket options.
pzmq
.
Create ØMQ socket.
@arg[type]{:pair | :pub | :sub | :req | :rep | :dealer | :router | :pull | :push | :xpub | :xsub | :stream}
pzmq
.
Jump to: | %
B C D E F G L M P R S V W Z |
---|
Jump to: | %
B C D E F G L M P R S V W Z |
---|
Jump to: | *
+
C E S |
---|
Jump to: | *
+
C E S |
---|
Jump to: | C E F G L P S |
---|
Jump to: | C E F G L P S |
---|