From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31423 invoked by alias); 19 Sep 2006 08:21:11 -0000 Received: (qmail 31415 invoked by uid 22791); 19 Sep 2006 08:21:11 -0000 X-Spam-Check-By: sourceware.org Received: from 62-177-154-238.dsl.bbeyond.nl (HELO lembu.sumatrasoftware.com) (62.177.154.238) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Sep 2006 08:21:09 +0000 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: New SocketChannel test that requires testing Date: Tue, 19 Sep 2006 08:21:00 -0000 Message-ID: In-Reply-To: <450FA587.8070707@gnu.org> From: "Jeroen Frijters" To: "Casey Marshall" Cc: X-IsSubscribed: yes Mailing-List: contact mauve-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-discuss-owner@sourceware.org X-SW-Source: 2006-q3/txt/msg00029.txt.bz2 Casey Marshall wrote: > Jeroen Frijters wrote: > > Casey Marshall wrote: > >> Maybe we are wrong for returning true for `isConnected' that=20 > >> early after trying to establish the connection; the test=20 > we're using > >> is whether or not the socket has a remote address or not, which may > >> not be the criteria we're interested in. > >=20 > > Yes, I believe that's incorrect. I think you can only=20 > transition into > > the connected state by calling finishConnect (if connect=20 > was called in > > non-blocking mode). > >=20 >=20 > That's not necessarily true; on some systems, even a non-blocking call > to connect() can succeed immediately, if you are connecting=20 > to the local machine. It doesn't sound right that you get this > condition even when the server process hasn't pulled the connection > off the queue, but that may be how it works. I don't think it has nothing to do with the underlying socket mechanics, it is simply an invariant of the SocketChannel API. Regards, Jeroen