From d1e6d898e10ce4e1162da668ed24295f7fbcfa3d Mon Sep 17 00:00:00 2001 From: c vw Date: Thu, 9 Sep 2021 16:19:51 +0200 Subject: [PATCH] updated IP QoS strategy (thanks D.G.) --- new_protocol.c | 3 ++- old_protocol.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/new_protocol.c b/new_protocol.c index 8b9d479..d6bac9d 100644 --- a/new_protocol.c +++ b/new_protocol.c @@ -595,7 +595,8 @@ void new_protocol_init(int pixels) { setsockopt(data_socket, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)); setsockopt(data_socket, SOL_SOCKET, SO_REUSEPORT, &optval, sizeof(optval)); #ifdef __APPLE__ - optval = 0x10; // IPTOS_LOWDELAY + //optval = 0x10; // IPTOS_LOWDELAY + optval = 0xb8; // DSCP EF if(setsockopt(data_socket, IPPROTO_IP, IP_TOS, &optval, sizeof(optval))<0) { perror("data_socket: SO_PRIORITY"); } diff --git a/old_protocol.c b/old_protocol.c index 14c46ed..c856db5 100644 --- a/old_protocol.c +++ b/old_protocol.c @@ -406,7 +406,8 @@ static void open_udp_socket() { perror("data_socket: SO_RCVBUF"); } #ifdef __APPLE__ - optval = 0x10; // IPTOS_LOWDELAY + //optval = 0x10; // IPTOS_LOWDELAY + optval = 0xb8; // DSCP EF if(setsockopt(tmp, IPPROTO_IP, IP_TOS, &optval, sizeof(optval))<0) { perror("data_socket: SO_PRIORITY"); } @@ -480,7 +481,8 @@ static void open_tcp_socket() { perror("tcp_socket: SO_RCVBUF"); } #ifdef __APPLE__ - optval = 0x10; // IPTOS_LOWDELAY + //optval = 0x10; // IPTOS_LOWDELAY + optval = 0xb8; // DSCP EF if(setsockopt(tmp, IPPROTO_IP, IP_TOS, &optval, sizeof(optval))<0) { perror("data_socket: SO_PRIORITY"); } -- 2.45.2