This is the mail archive of the
mauve-discuss@sourceware.org
mailing list for the Mauve project.
RE: New SocketChannel test that requires testing
- From: "Jeroen Frijters" <jeroen at sumatra dot nl>
- To: "Casey Marshall" <csm at gnu dot org>
- Cc: <mauve-discuss at sourceware dot org>
- Date: Wed, 20 Sep 2006 06:34:46 +0200
- Subject: RE: New SocketChannel test that requires testing
Casey Marshall wrote:
> > I don't think it has nothing to do with the underlying
> > socket mechanics,
> > it is simply an invariant of the SocketChannel API.
>
> Nope:
>
> "If this channel is in non-blocking mode then an invocation of this
> method initiates a non-blocking connection operation. If the
> connection is established immediately, as can happen with a local
> connection, then this method returns true. Otherwise this method
> returns false and the connection operation must later be completed
> by invoking the finishConnect method." [1]
>
> 1.
> http://java.sun.com/j2se/1.4.2/docs/api/java/nio/channels/Sock
> etChannel.html#connect(java.net.SocketAddress)
May be I misunderstood what you meant, we were talking about
isConnected() changing its return value right? The only way I can read
the text you quoted is that it confirms that isConnected() will only
return true iff either connect() or finishConnect() previously returned
true.
Regards,
Jeroen