Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ucla-cs!zen!ucbvax!OPAL.BERKELEY.EDU!minshall From: minshall@OPAL.BERKELEY.EDU Newsgroups: comp.protocols.tcp-ip Subject: Re: Are simultaneous TCP opens useful? Message-ID: <8709021539.AA22092@opal.berkeley.edu> Date: Wed, 2-Sep-87 11:39:47 EDT Article-I.D.: opal.8709021539.AA22092 Posted: Wed Sep 2 11:39:47 1987 Date-Received: Sat, 5-Sep-87 06:14:53 EDT References: <1261@spice.cs.cmu.edu> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 22 Eric, Whether "simultaneous" opens will always succeed or randomly fail depends on how the underlying TCP service is implemented. If the user code needs to look like this: { if (connect() == FAIL) { listen(); } } then there is a race condition in which both sides may hang in listen(). Side A fails to connect, but before A issues listen, side B tries to connect and fails. However, if the underlying TCP service allows this: { connect_or_listen(); } as a primitive, then the simultaneous case seems to me to be guaranteed to win. Note that I don't know of any underlying services that allow the second form. Greg Minshall