sockets

Kenneth J. Hendrickson kjh at pollux.usc.edu
Sun May 27 23:44:49 AEST 1990


About a year ago, somebody posted a really nice primer on sockets.  I
didn't save it.  Now, I wish I had.  Does anybody still have it?  If you
have any good examples (or that primer on sockets), would you please
post it?  Thanks.

I have to write a program using sockets, and I'm having a problem.  The
Sun IPC manual isn't helping.  I want to use the SOCK_STREAM type.
After creating 5 sockets, bind()ing a unique name to each, and listen()ing
to each of the sockets, I fork off 5 processes.  Each of the forked
processes creates it's own socket, and tries to do a connect() to one of
the previously created and named sockets, while the original routine
tries to accept() connections.  The problem is that one of the forked
routines is not able to connect(), it never returns from the connect()
call.  In addition, I can't send read() or write() any data across the
connected sockets for the other 4 processes.  Help!

Ken Hendrickson N8DGN/6      kjh at usc.edu      ...!uunet!usc!pollux!kjh



More information about the Comp.unix.wizards mailing list