Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!ncrlnk!ncr-sd!tw-rnd!johnl From: johnl@tw-rnd.SanDiego.NCR.COM (johnl) Newsgroups: comp.unix.questions Subject: Socket programming examples wanted Keywords: socket IPC help Message-ID: <101@tw-rnd.SanDiego.NCR.COM> Date: 16 Oct 89 17:35:23 GMT Organization: NCR Corporation - Distributed Systems Lab Lines: 25 I would like to get some sample code illustrating the use of sockets in a client/server model. I am using Internet domain, stream sockets and am having some trouble. In my example code: ------------------ 1. The server creates/binds/listens on a socket with a well-known port number 2. The client creates a socket and connects to the server's socket. 3. The client sends a message. 4. The server (using select) detects the incoming message, calls accept to get a new file descriptor, forks a child which calls recv to read the message, child closes it's (new) socket and dies. 5. Goto 3. The first message is transferred correctly, but subsequent messages are "lost". Any help or sample code appreciated! I can email the code to anyone interested in helping me debug. Thanks!! -- ---------------------------------------------------------------------- John Lindwall johnl@tw-rnd.SanDiego.NCR.COM "Above opinions are my own, not my employer's" PenPal V1.1 for sale: $90. All original disks, manual, box. Registration.