inet
inet copied to clipboard
Not possible to bind two UDP sockets to the same port if one of them uses ANY local address
If the first socket is bound to ANY/7777, and trying to bind to second to 192.168.1.1/7777, then the second call fails in UDP::findSocketByLocalAddress().
The socket API allows two applications to use the same port provided that they use different local addresses and that SO_REUSEADDR socket option is set to true on all sockets. Sockets bound to a specific address will receive unicast packets sent to that address, while the socket bound to ANY will receive the packets whose destination address does not match any other socket.
from: http://dev.omnetpp.org/bugs/view.php?id=653