This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes multicast problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "multicast problems" Watch "multicast problems" New topic

multicast problems

Daniil Sosonkin
Ranch Hand

Joined: Jan 15, 2004
Posts: 76
Hello, I have two small programs, one server that sends out messages and clients that receive it. Server runs on Linux with two (2) NICs and broadcasts. I've set it to broadcast to and then client joins Otherwise nothing is being received. So the problem is that this client receives one packet twice. Maybe I'm doing something totally wrong. I'd really appreciate if someone took a look at simple code below and point it where its wrong cause I'm totally lost. Btw, if I set server to broadcast to then client receives nothing.

The server:

The client:

[ November 12, 2004: Message edited by: Daniil Sosonkin ]
Don't get me started about those stupid light bulbs.
subject: multicast problems
Similar Threads
Hint needed: TCP -> UDP , test on localhost
UDP programming
Urgently Help/Guidance Required
Writing a class that receive and broadcast at the same time
multicast socket problem