mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-09 15:26:04 +00:00
ZMQ_SNDBUF and ZMQ_RCVBUF honoured in PGM transport
This commit is contained in:
parent
68488215da
commit
bd792faa9d
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user