home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.internals
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!menudo.uh.edu!nagappa
- From: nagappa@menudo.uh.edu (Chaitanya Nagappa)
- Subject: Multiple listeners on same socket
- Message-ID: <1992Jul22.034730.12159@menudo.uh.edu>
- Organization: University of Houston
- Date: Wed, 22 Jul 1992 03:47:30 GMT
- Lines: 35
-
- The following is posted for a friend of mine.
- -C. Nagappa.
-
- ==============================================================================
- 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.
- Yes, I know neither BSD sockets or TLI can do this. What is then the
- alternative? Do I have to create my own virtual device?
-
- Message queues & FIFOs are not a viable alternative, as the information
- once placed cannot be easily retracted. For those of you who want the
- details of what I am trying to do:
- I have a machine that has a X.25 board on it. Unfortunately, the Co.
- that wrote the drivers for incoming calls on it assumed that the call
- can be handled on a one to one basis. I have 10 processes running with
- each being able to handle about 12 calls. The processes are event driven
- (using select). I thus need the process being spawned by the incoming
- call to pass on its logical channel number to any one of my 10 processes.
- 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 could
- assign one port per consumer process, and have my incoming call contact
- all of them, so that only the processes that are still consuming (not
- reached the limit) can respond, and the first respondant gets the info.
- However, this leads to a factorial number of attempts to calls established
- (not efficient). I hope someone out there has a solution! If emailing to
- this account, please mention my name and I will get a copy of it.
-
- Thanks a lot,
- --Ravi.
-