Motivation: While developing a discovery protocol, I required the ability to have multiple clients/servers running on the same machine.
Other operating systems package this as SO_REUSE*.
This patch allows multiple clients to receive UDP packets destined for the same address/port.
When announcing, clients can specify the reuse flag 'announce 5050 reuse'.
If all prior clients specified the reuse flag, then the announce will succeed and the client will receive a copy of all packets.
Once an address/port is announced with reuse, all subsequent clients must also specify reuse.
|