Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Receiving Unicast packets on Multicast socket

Reply
Thread Tools

Receiving Unicast packets on Multicast socket

 
 
Rich DeMarinis
Guest
Posts: n/a
 
      10-22-2004
Is it possible to have a single MulticastSocket also receive Unicast
packets in Java? I'm able to bind one of each socket to the same port
but I'd like to be able to use just one socket. I'm running under
RedHat 9.0.

Thanks,
Rich
 
Reply With Quote
 
 
 
 
Gordon Beaton
Guest
Posts: n/a
 
      10-25-2004
On 22 Oct 2004 14:06:38 -0700, Rich DeMarinis wrote:
> Is it possible to have a single MulticastSocket also receive Unicast
> packets in Java? I'm able to bind one of each socket to the same
> port but I'd like to be able to use just one socket. I'm running
> under RedHat 9.0.


Yes, since your application uses the same port number for unicast and
multicast datagrams.

MulticastSocket is a subclass of DatagramSocket, so it can receive
unicast datagrams. This is regardless of any multicast groups it has
joined, however it will only receive datagrams (of either kind) sent
to the bound port.

/gordon

--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unicast to Multicast Solution dano Cisco 1 11-24-2008 11:04 AM
Symantec Ghost Multicast/Unicast Ned Cisco 3 05-10-2007 09:10 PM
Forwarding multicast packets. Robert Dohrenburg Cisco 3 05-21-2005 01:35 PM
unicast to multicast conversion? vt Cisco 9 02-14-2005 12:25 PM
How to turn off (Disable) Multicast RPF Check (Needs forwarding Non-RPF Packets) meteor713 Cisco 2 12-06-2004 04:51 AM



Advertisments