0

I am using the example server and client from this website. I have the client on my laptop and the server on my other laptop.

When I run them the server doesn't receive anything. When I run the server and client on the same laptop (doesn't matter which one) the server is able to receive messages. What might be the problem here?

One laptop has W7 and the other W10

user3549340
  • 121
  • 2
  • 2
  • 7

1 Answers1

0

I suggest you test multicast connectivity between your two machines using an existing program (without programming anything in Java). Are they in the same subnet?

I haven't used multicast in the last 10 years, but a quick search yields many results.

Stefan Reich
  • 1,000
  • 9
  • 12
  • Would you mind telling me an example for such a program? – user3549340 Dec 04 '17 at 11:44
  • Sure, I put a Google link the answer :) – Stefan Reich Dec 04 '17 at 11:48
  • I tested the connectivity and I see that multicast only works when the server is on the same machine as the sender. What might be the problem here? And yes, they are on the same subnet – user3549340 Dec 04 '17 at 11:56
  • Is Windows Firewall disabled? I think I'm out of expertise here... multicast is a complicated beast. See [here](https://serverfault.com/questions/348156/troubleshooting-udp-multicast-on-windows). Any reason you can't go with simple TCP/UDP? – Stefan Reich Dec 04 '17 at 11:59
  • With TCP/UDP I would have to send the message to everybody in my subnet, with multicast only the ones who 'subscribe' can receive it. I tried to disable the firewall but the results were the same. I also looked at the linked thread but I didn't find anything that would help me :/ – user3549340 Dec 04 '17 at 12:15
  • Sorry... I never dared to actually use multicast. The other thread sounds like it is hard to set up, even for experts. I'd like to use something like multicast, but I guess current technology is not where it should be. Are you targeting many machines in one network? – Stefan Reich Dec 04 '17 at 12:25