Client uses randomly picked port and address (not actually random), but in some cases it helps if the client uses a given address and port.
For example, when server has no public address and both client and server are behind several layer of (stateful) firewalls.
Some kind of hole punching mechanism is needed (in my case 2 devices simultaneously sending UDP packet towards each other), before the application (client and servers) are started.
Client uses randomly picked port and address (not actually random), but in some cases it helps if the client uses a given address and port.
For example, when server has no public address and both client and server are behind several layer of (stateful) firewalls.
Some kind of hole punching mechanism is needed (in my case 2 devices simultaneously sending UDP packet towards each other), before the application (client and servers) are started.