Closed phckopper closed 1 year ago
For instance, when running on the UFRGS network the packet gets sent to the whole network
This is undesirable as we might want to sent packets to a specific interface, for instance the loopback one, in order to test our application.
I assume that it would facilitate the execution of program tests (127.0.0.1): Fact, at the moment I was performing tests on my laptop that was on the same network as my desktop computer. If possible, we can make this change, but I believe that at work this is the command that we should use, or not?
We should find an alternative for using
INADDR_BROADCAST
as it doesn't send a packet to all interface, only to the highest priority one.https://github.com/pedrorigon/wakeUP_Computer/blob/6ac0ad6d3572658420c3e4607254817d81365dc4/discovery_service.c#L25
See: https://stackoverflow.com/questions/683624/udp-broadcast-on-all-interfaces