Reputation: 780
This is for a school project so I need to use UDP Broadcast.
I am building a P2P app that uses only port 5000 over UDP. I need to send a discovery broadcast packet to all clients in my network.
Normally the app will be used over Hamachi but for the purpose of developing I would like to use the simplest fastest network environment so I would like to test multiple instances locally.
I discovered that it is possible to use 127.0.0.1 127.0.0.2 etc as IPs for my local instance. (Actually tested with ips from 1 to 6 and sending messages at random to each other)
I now need to use the SAME port 5000 but do a broadcast UDP
When I invoke ifconfig on the loopback interface I do not see the BROADCAST option.
Since apparently it is impossible to add the BROADCAST option to the loopback interface, what is the easiest way to have:
Should I consider using Docker or VM or some network simulator for this purpose?
Upvotes: 1
Views: 2042