mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-07 05:58:45 +01:00
LIBZMQ-195 allow explicitly setting sndbuf and rcvbuf to 0 (see https://support.microsoft.com/en-us/kb/201213)
This commit is contained in:
@@ -196,14 +196,14 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
|
||||
|
||||
{
|
||||
const int rcvbuf = (int) options.rcvbuf;
|
||||
if (rcvbuf) {
|
||||
if (rcvbuf >= 0) {
|
||||
if (!pgm_setsockopt (sock, SOL_SOCKET, SO_RCVBUF, &rcvbuf,
|
||||
sizeof (rcvbuf)))
|
||||
goto err_abort;
|
||||
}
|
||||
|
||||
const int sndbuf = (int) options.sndbuf;
|
||||
if (sndbuf) {
|
||||
if (sndbuf >= 0) {
|
||||
if (!pgm_setsockopt (sock, SOL_SOCKET, SO_SNDBUF, &sndbuf,
|
||||
sizeof (sndbuf)))
|
||||
goto err_abort;
|
||||
|
||||
Reference in New Issue
Block a user