mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-04-07 17:05:37 +00:00
UDP: readded SO_REUSEPORT
This commit is contained in:
@@ -329,6 +329,14 @@ static socket_udp *udp_init4(const char *addr, const char *iface,
|
||||
sizeof(udpbufsize)) != 0) {
|
||||
debug_msg("WARNING: Unable to increase UDP recvbuffer\n");
|
||||
}
|
||||
#ifdef SO_REUSEPORT
|
||||
if (SETSOCKOPT
|
||||
(s->fd, SOL_SOCKET, SO_REUSEPORT, (int *)&reuse,
|
||||
sizeof(reuse)) != 0) {
|
||||
socket_error("setsockopt SO_REUSEPORT");
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
if (SETSOCKOPT
|
||||
(s->fd, SOL_SOCKET, SO_REUSEADDR, (char *)&reuse,
|
||||
sizeof(reuse)) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user