0

I'm discovering network using UDP broadcast like https://stackoverflow.com/a/22853295/13117660.

I have tried 4 different options.

LAN Server/LAN Client LAN Server/WIFI Client WIFI Server/LAN Client WIFI Server/WIFI CLIENT

Options 1. 2. and 4. work like a charm. Clients find the Server send some data, Server responds and Clients do something with that data.

But when I try option 3. (where my Server is running on a laptop that has WIFI connection and my Client is running on another laptop that has LAN connection) the Client doesn't find the Server. Client sends a message but Server doesn't receive it.

Server and Client are both connected to the same router.

I have managed to bypass this problem on one router by sending the message to 192.168.0.255. When using regular broadcast address 255.255.255.255 message wasn't received. (Default Gateway is 192.168.0.1)

But when trying this on another router (Default Gateway 10.1.10.1) it won't work in both cases. Even if I'm sending a packet to 255.255.255.255 or 10.1.10.255.

Can you tell me why is this happening? Can I somehow get pass this problem?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.