Re: multiple process notification

From: Donald Roby (droby_at_acm.org)
Date: 10/09/04


Date: Sat, 09 Oct 2004 14:18:19 GMT

On Thu, 07 Oct 2004 07:23:47 -0700, lukasz wrote:

> Hi
>
> I'm a java newbie trying to find a solution to the following problem. I
> need to send a broadcast or a signal to multiple cliens running on the
> same machine. The clients would then connect to the server to confirm
> the receipt of such broadcast/signal/event/whatever. This is supposed to
> be a basic control mechanism between worker processes and a process
> monitor. I guess the receipt from a client can be done with sockets, but
> how do I broadcast to processes on the same machine?
>
> Thanks,
> Lukasz

You might want to use multicast sockets for this. Take a look at
http://java.sun.com/docs/books/tutorial/networking/datagrams/broadcasting.html
and maybe the rest of the networking tutorial around it.

I haven't done it myself, but I believe with multicast you ARE allowed to
have multiple clients running on the same machine listening on the same
multicast port. This is certainly not something you can do with unicast
sockets.



Relevant Pages

  • Re: multiple process notification
    ... > need to send a broadcast or a signal to multiple cliens running on the ... You might want to use multicast sockets for this. ...
    (comp.lang.java.help)
  • Re: Deferring inp_freemoptions() to an asychronous task
    ... I'm glad there are people, outside of finance and broadcast, who ... understand the teething pains of multicast. ... I might be able to spare cycles to test patches, ... traditionally dealt with broadcast/multicast sockets. ...
    (freebsd-net)
  • Wireless LAN unter Gentoo Linux auf Acer Aspire 3022
    ... UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 ... eth1 Link encap:UNSPEC HWaddr ... Date format: Timestamp ...
    (de.comp.os.unix.linux.hardware)
  • Re: Threads and DoModal
    ... broadcast message to all servers listening on 9999. ... synchronous sockets are going to cause other problems) and replace it with CAsyncSocket. ... of the many reasons to not ever consider CSocket a viable mechanism. ... If your threads are exiting, I suggest you study the termination conditions of the ...
    (microsoft.public.vc.mfc)
  • Re: Multicast MAC and Unicast IP Address
    ... I am interested in knowing what the rules are because up to now everybody just told me that it is a strange way to use multicast but some also said that it is illegal. ... When a host sends a datagram to a link-layer broadcast address, the IP destination address MUST be a legal IP broadcast or IP multicast address. ... I believe that the use of a multicast MAC address to send a unicast IP packet to a group of devices (e.g., a cluster) is a perfectly correct use of link-layer multicast, assuming that the cluster software knows how to deal with the fact that multiple devices are receiving the same IP datagram. ...
    (comp.dcom.lans.ethernet)