Altering default SO_PRIORITY of a socket.
From: Janek Wrobel <hidden>
Date: 2011-01-19 10:02:55
From: Janek Wrobel <hidden>
Date: 2011-01-19 10:02:55
Hi, Does Linux allow to change default priority of listening or connected sockets, without process ever calling setsockopt(..,SO_PRIORITY,..)? In other words, in a following sequence of events, is it possible that priority_a, or priority_b will ever be non 0 (assuming all calls succeeded)? sock = socket(AF_INET, SOCK_STREAM, 0); bind(sock, some address) listen(sock, ...) int priority_a; getsockopt(sock, SOL_SOCKET, SO_PRIORITY, &priority_a, sizeof(priority_a)) client_sock = accept(sock, ...); int priority_b; getsockopt(client_sock, SOL_SOCKET, SO_PRIORITY, &priority_b, sizeof(priority_b)) thanks, Janek