diff options
author | Martin Sustrik <sustrik@fastmq.commkdir> | 2009-12-10 09:47:24 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@fastmq.commkdir> | 2009-12-10 09:47:24 +0100 |
commit | 2e39f892c353851fe90261db0a0875abab50539f (patch) | |
tree | ef7a2eb32a84418f21180ec79a39f4090f784d5b /src/zmq_engine.cpp | |
parent | 72dacc35702a14ab0bb5a2650dffbb3bbda63175 (diff) |
ZMQII-27: Allow setting SNDBUF and RCVBUF size from 0MQ API (POSIX)
Diffstat (limited to 'src/zmq_engine.cpp')
-rw-r--r-- | src/zmq_engine.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/zmq_engine.cpp b/src/zmq_engine.cpp index e8e689d..e8c9889 100644 --- a/src/zmq_engine.cpp +++ b/src/zmq_engine.cpp @@ -24,7 +24,8 @@ #include "config.hpp" #include "err.hpp" -zmq::zmq_engine_t::zmq_engine_t (io_thread_t *parent_, fd_t fd_) : +zmq::zmq_engine_t::zmq_engine_t (io_thread_t *parent_, fd_t fd_, + const options_t &options_) : io_object_t (parent_), inbuf (NULL), insize (0), @@ -32,7 +33,8 @@ zmq::zmq_engine_t::zmq_engine_t (io_thread_t *parent_, fd_t fd_) : outbuf (NULL), outsize (0), outpos (0), - inout (NULL) + inout (NULL), + options (options_) { // Allocate read & write buffer. inbuf_storage = (unsigned char*) malloc (in_batch_size); @@ -41,7 +43,7 @@ zmq::zmq_engine_t::zmq_engine_t (io_thread_t *parent_, fd_t fd_) : zmq_assert (outbuf_storage); // Initialise the underlying socket. - int rc = tcp_socket.open (fd_); + int rc = tcp_socket.open (fd_, options.sndbuf, options.rcvbuf); zmq_assert (rc == 0); } |