Init.
[cl-zmq.git] / grovel.lisp
blobdf21a186e78a039dd7d8982509b174c34f992a98
1 (include "zmq.h")
3 (in-package :cl-zmq)
5 ;; Maximal size of "Very Small Message". VSMs are passed by value
6 ;; to avoid excessive memory allocation/deallocation.
7 ;; If VMSs larger than 255 bytes are required, type of 'vsm_size'
8 ;; field in zmq_msg_t structure should be modified accordingly.
9 (constant (zmq-max-vsm-size "ZMQ_MAX_VSM_SIZE"))
11 ;; Message & notification types.
12 (constant (zmq-gap "ZMQ_GAP"))
13 (constant (zmq-delimiter "ZMQ_DELIMITER"))
14 (constant (zmq-vsm "ZMQ_VSM"))
16 ;; Socket options.
17 (constant (zmq-hwm "ZMQ_HWM")) ;; int64_t
18 (constant (zmq-lwm "ZMQ_LWM")) ;; int64_t
19 (constant (zmq-swap "ZMQ_SWAP")) ;; int64_t
20 (constant (zmq-affinity "ZMQ_AFFINITY")) ;; int64_t
21 (constant (zmq-identity "ZMQ_IDENTITY")) ;; string
22 (constant (zmq-subscribe "ZMQ_SUBSCRIBE")) ;; string
23 (constant (zmq-unsubscribe "ZMQ_UNSUBSCRIBE")) ;; string
24 (constant (zmq-rate "ZMQ_RATE")) ;; int64_t
25 (constant (zmq-recovery-ivl "ZMQ_RECOVERY_IVL")) ;; int64_t
26 (constant (zmq-mcast-loop "ZMQ_MCAST_LOOP")) ;; int64_t
28 ;; The operation should be performed in non-blocking mode. I.e. if it cannot
29 ;; be processed immediately, error should be returned with errno set to EAGAIN.
30 (constant (zmq-noblock "ZMQ_NOBLOCK"))
32 ;; zmq_send should not flush the message downstream immediately. Instead, it
33 ;; should batch ZMQ_NOFLUSH messages and send them downstream only if zmq_flush
34 ;; is invoked. This is an optimisation for cases where several messages are
35 ;; sent in a single business transaction. However, the effect is measurable
36 ;; only in extremely high-perf scenarios (million messages a second or so).
37 ;; If that's not your case, use standard flushing send instead. See exchange
38 ;; example for illustration of ZMQ_NOFLUSH functionality.
39 (constant (zmq-noflush "ZMQ_NOFLUSH"))
41 ;; Socket to communicate with a single peer. Allows for a singe connect or a
42 ;; single accept. There's no message routing or message filtering involved.
43 (constant (zmq-p2p "ZMQ_P2P"))
45 ;; Socket to distribute data. Recv fuction is not implemented for this socket
46 ;; type. Messages are distributed in fanout fashion to all peers.
47 (constant (zmq-pub "ZMQ_PUB"))
49 ;; Socket to subscribe to distributed data. Send function is not implemented
50 ;; for this socket type. However, subscribe function can be used to modify the
51 ;; message filter.
52 (constant (zmq-sum "ZMQ_SUB"))
54 ;; Socket to send requests on and receive replies from. Requests are
55 ;; load-balanced among all the peers. This socket type doesn't allow for more
56 ;; recv's that there were send's.
57 (constant (zmq-req "ZMQ_REQ"))
59 ;; Socket to receive requests from and send replies to. This socket type allows
60 ;; only an alternated sequence of recv's and send's. Each send is routed to
61 ;; the peer that the previous recv delivered message from.
62 (constant (zmq-rep "ZMQ_REP"))