Commit bd792faa authored by Martin Sustrik's avatar Martin Sustrik

ZMQ_SNDBUF and ZMQ_RCVBUF honoured in PGM transport

parent 68488215
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment