summaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-12-10 09:47:24 +0100
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-12-10 09:47:24 +0100
commit2e39f892c353851fe90261db0a0875abab50539f (patch)
treeef7a2eb32a84418f21180ec79a39f4090f784d5b /bindings
parent72dacc35702a14ab0bb5a2650dffbb3bbda63175 (diff)
ZMQII-27: Allow setting SNDBUF and RCVBUF size from 0MQ API (POSIX)
Diffstat (limited to 'bindings')
-rw-r--r--bindings/c/zmq.h2
-rw-r--r--bindings/cl/zeromq.lisp2
-rw-r--r--bindings/java/org/zmq/Socket.java2
-rw-r--r--bindings/python/pyzmq.cpp6
-rw-r--r--bindings/ruby/rbzmq.cpp2
5 files changed, 14 insertions, 0 deletions
diff --git a/bindings/c/zmq.h b/bindings/c/zmq.h
index 849ddef..ae8d6b1 100644
--- a/bindings/c/zmq.h
+++ b/bindings/c/zmq.h
@@ -159,6 +159,8 @@ ZMQ_EXPORT int zmq_term (void *context);
#define ZMQ_RATE 8
#define ZMQ_RECOVERY_IVL 9
#define ZMQ_MCAST_LOOP 10
+#define ZMQ_SNDBUF 11
+#define ZMQ_RCVBUF 12
#define ZMQ_NOBLOCK 1
#define ZMQ_NOFLUSH 2
diff --git a/bindings/cl/zeromq.lisp b/bindings/cl/zeromq.lisp
index 94f7672..03befd5 100644
--- a/bindings/cl/zeromq.lisp
+++ b/bindings/cl/zeromq.lisp
@@ -158,6 +158,8 @@
(defconstant rate 8)
(defconstant recovery-ivl 9)
(defconstant mcast-loop 10)
+(defconstant sndbuf 11)
+(defconstant rcvbuf 12)
(defcfun* ("zmq_setsockopt" %setsockopt) :int
(s :pointer)
diff --git a/bindings/java/org/zmq/Socket.java b/bindings/java/org/zmq/Socket.java
index 396a6a0..935fade 100644
--- a/bindings/java/org/zmq/Socket.java
+++ b/bindings/java/org/zmq/Socket.java
@@ -47,6 +47,8 @@ public class Socket
public static final int RATE = 8;
public static final int RECOVERY_IVL = 9;
public static final int MCAST_LOOP = 10;
+ public static final int SNDBUF = 11;
+ public static final int RCVBUF = 12;
/**
* Class constructor.
diff --git a/bindings/python/pyzmq.cpp b/bindings/python/pyzmq.cpp
index 26ca7ac..f171eab 100644
--- a/bindings/python/pyzmq.cpp
+++ b/bindings/python/pyzmq.cpp
@@ -534,6 +534,12 @@ PyMODINIT_FUNC initlibpyzmq ()
t = PyInt_FromLong (ZMQ_MCAST_LOOP);
PyDict_SetItemString (dict, "MCAST_LOOP", t);
Py_DECREF (t);
+ t = PyInt_FromLong (ZMQ_SNDBUF);
+ PyDict_SetItemString (dict, "SNDBUF", t);
+ Py_DECREF (t);
+ t = PyInt_FromLong (ZMQ_RCVBUF);
+ PyDict_SetItemString (dict, "RCVBUF", t);
+ Py_DECREF (t);
t = PyInt_FromLong (ZMQ_POLL);
PyDict_SetItemString (dict, "POLL", t);
Py_DECREF (t);
diff --git a/bindings/ruby/rbzmq.cpp b/bindings/ruby/rbzmq.cpp
index 2a26ce1..43baeef 100644
--- a/bindings/ruby/rbzmq.cpp
+++ b/bindings/ruby/rbzmq.cpp
@@ -266,6 +266,8 @@ extern "C" void Init_librbzmq ()
rb_define_global_const ("RATE", INT2NUM (ZMQ_RATE));
rb_define_global_const ("RECOVERY_IVL", INT2NUM (ZMQ_RECOVERY_IVL));
rb_define_global_const ("MCAST_LOOP", INT2NUM (ZMQ_MCAST_LOOP));
+ rb_define_global_const ("SNDBUF", INT2NUM (ZMQ_SNDBUF));
+ rb_define_global_const ("RCVBUF", INT2NUM (ZMQ_RCVBUF));
rb_define_global_const ("NOBLOCK", INT2NUM (ZMQ_NOBLOCK));
rb_define_global_const ("NOFLUSH", INT2NUM (ZMQ_NOFLUSH));