This is the mail archive of the mauve-discuss@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]