home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.internals
- Path: sparky!uunet!caen!zaphod.mps.ohio-state.edu!menudo.uh.edu!nagappa
- From: nagappa@menudo.uh.edu (Chaitanya Nagappa)
- Subject: Re: Multiple listeners on same socket
- Message-ID: <1992Jul23.140202.9816@menudo.uh.edu>
- Organization: University of Houston
- References: <1992Jul22.034730.12159@menudo.uh.edu> <1992Jul23.084108.22337@rdg.dec.com>
- Date: Thu, 23 Jul 1992 14:02:02 GMT
- Lines: 44
-
- The following reply is again posted for a friend, viz, Ravi Ramachandran.
- -C. Nagappa.
- ---------------------------------------------------------------------------
-
- In article <1992Jul23.084108.22337@rdg.dec.com> jfoy@narcy.gao.dec.com (John Foy) writes:
- >
- >In article <1992Jul22.034730.12159@menudo.uh.edu>, nagappa@menudo.uh.edu writes:
- >|>==============================================================================
- >|>Howdy all,
- >|>I need something equivalent to a socket, but that more than one process
- >|>can listen on. This is for multiple consumers, and the output from the
- >|>server can be picked up by any one of the consumers. In the simplest
- >|>scenario, I have two processes doing a "listen" on the same socket,
- >|>and only one of these process is trigerred to establish the circuit.
- >|>[...]
- >|>The problem of statically placing this using standard IPC methods such as
- >|>message queues, FIFOs or shared memory is that by the time my processes
- >|>get around to receiving the info. (worst case scenario) the call might
- >|>have been cleared. So I need a phased communication of the info.
- >
- >I'm not sure what you mean by "phased communcation..."?
- >
- I need both sides to establish communication/ know it was established -
- similar to that of a virtual circuit establishment (SYNC, ACK, etc.).
-
- >I'm not entirely familiar with select etc... (being more of a VMS'r) but have
- >you considered semaphores? e.g. the server pool waits on a counting semaphore
- >which is incremented by the 'dispatching' process (I think you refer to this
- >as the 'spawned' process)...? This way only available servers respond...
- >
- "select" enables the process to work wait for an event to occur on one of
- multiple file descriptors - FIFOs, streams, etc. Unfortunately, not on
- message queues, semaphores, or any other muliplexed listening posts.
-
- From a fellow netter I had received a possible solution using signals.
- Unfortunately, there is the problem that multiple signals, before processing
- it, will be seen as a single signal. Another reply indicated that this
- was a flaw with standard Unix implementation that device driver writers
- had to deal with; unfortunately, the solution was propreitary.
-
- > jf
- >
- --Ravi.
-
-