Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site milo.UUCP
Path: utzoo!linus!philabs!cmcl2!seismo!umcp-cs!aplvax!milo!ded
From: ded@milo.UUCP (Don E. Davis)
Newsgroups: net.unix-wizards,net.unix
Subject: Connecting to sockets
Message-ID: <177@milo.UUCP>
Date: Tue, 29-Oct-85 14:34:20 EST
Article-I.D.: milo.177
Posted: Tue Oct 29 14:34:20 1985
Date-Received: Fri, 1-Nov-85 02:01:17 EST
Reply-To: ded@milo.UUCP (Don E. Davis)
Organization: JHU/Applied Physics Lab, Laurel, MD
Lines: 8
Xref: linus net.unix-wizards:12698 net.unix:5507

I have two programs which communicate through sockets.
One program accept()'s connect()ions from the other program.
When the "accepting" program runs first, everything works fine.
When I run the "connecting" program first, it fails for ECONNREFUSED
the first time (reasonable enough), but thereafter it fails for
EINVAL (which I don't understand).  And, in fact, the "connecting"
program will continue to fail even after I've invoked the "accepting"
program.  What goes on here?