Problem: No direct support for setting socket priority (#4118)

* Problem: No direct support for setting socket priority

Solution: Add ZMQ_PRIORITY socket option, which sets the
SO_PRIORITY socket option on the underlying socket. This
socket option is not supported under Windows. Check option
and set socket option on creation of underlying socket.
This commit is contained in:
Andy Heroff
2021-01-06 16:22:41 -06:00
committed by GitHub
parent 9936ce8bb9
commit 2998ff34aa
18 changed files with 172 additions and 0 deletions

View File

@@ -269,5 +269,9 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
if (options.tos != 0)
set_ip_type_of_service (sock, options.tos);
// Set the protocol-defined priority for this client socket
if (options.priority != 0)
set_socket_priority (sock, options.priority);
return sock;
}