I didn't program very much here, but you probably need to provide more information about the library, OS version, code, etc. Maybe an example code?
If I remember the books that I read, if you set the flag on the socket, this will affect all datagrams sent from the socket, because the socket is basically a network flag data structure + file descriptor.
source share