home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / internal / 1709 < prev    next >
Encoding:
Text File  |  1992-08-19  |  1.7 KB  |  46 lines

  1. Newsgroups: comp.unix.internals
  2. Path: sparky!uunet!destroyer!gatech!hubcap!news
  3. From: rsaripa@venus.cs.clemson.edu (Saripalli Ramakrishna)
  4. Subject: Socket to which related processes may read/write ?.
  5. Message-ID: <1992Aug19.225324.21116@hubcap.clemson.edu>
  6. Sender: news@hubcap.clemson.edu (news)
  7. Organization: Clemson University Computer Science Dept.
  8. Distribution: na
  9. Date: Wed, 19 Aug 1992 22:53:24 GMT
  10. Lines: 34
  11.  
  12. Hi ,
  13.  
  14.     I would like to know if there is any way a socket can be established
  15.     by some ancestor so that all of its descendants might be able to
  16.     monitor the socket(channel) and be able to read/write from/to the
  17.     socket.
  18.  
  19.     I am specifically interested in sockets because my program uses 
  20.     recv() system calls(which I found very useful) and it works only 
  21.     on sockets(Even socketpair() would not work).
  22.  
  23.     I want to use recv() system calls because I want to peek at the 
  24.     incoming stream to retrieve the control information which always
  25.     precedes the actual data .For instance,the control information
  26.     contains the actual length(bytes) of the following message,the 
  27.     identity of the sender and some other relevant information.
  28.     
  29.     Of course,the length of the control information is constant across
  30.     all messages.the processes would do recv() on the socket ,peek
  31.     at the incoming stream(MSG_PEEK option of recv()) and remove from
  32.     the stream messages relevant to themselves.
  33.  
  34.     I need this info very much.I went through Rich Stevens "Network
  35.     Programming in Unix" but I was not able to find the relevant info.
  36.  
  37.     I would appreciate anyone who could send me this info.I will post
  38.     to the group if there is enough interest.
  39.  
  40.                         Thanks in advance,
  41.                         Saripalli Ramakrishna
  42.  
  43. e-mail : rsaripa@cs.clemson.edu
  44.  
  45. Man is a beast and usually has no control over his passions.
  46.