summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pgm_socket.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp
index 3b67b76..a16acd6 100644
--- a/src/pgm_socket.cpp
+++ b/src/pgm_socket.cpp
@@ -197,9 +197,14 @@ int zmq::pgm_socket_t::open_transport ()
// Set transport->can_send_data = FALSE.
// Note that NAKs are still generated by the transport.
rc = pgm_transport_set_recv_only (transport, true, false);
-
zmq_assert (rc == pgm_ok);
+ if (options.rcvbuf) {
+ rc = pgm_transport_set_rcvbuf (transport, (int) options.rcvbuf);
+ if (rc != pgm_ok)
+ return -1;
+ }
+
// Set NAK transmit back-off interval [us].
rc = pgm_transport_set_nak_bo_ivl (transport, 50 * 1000);
zmq_assert (rc == pgm_ok);
@@ -260,6 +265,12 @@ int zmq::pgm_socket_t::open_transport ()
rc = pgm_transport_set_send_only (transport, TRUE);
zmq_assert (rc == pgm_ok);
+ if (options.sndbuf) {
+ rc = pgm_transport_set_sndbuf (transport, (int) options.sndbuf);
+ if (rc != pgm_ok)
+ return -1;
+ }
+
// Set the size of the send window.
// Data rate is in [B/s] options.rate is in [kb/s].
if (options.rate <= 0) {