Code Review Request: 7096436: (sc) SocketChannel.connect fails on Windows 8 when channel configured non-blocking

Alan Bateman Alan.Bateman at oracle.com
Mon May 7 10:11:56 PDT 2012


On 07/05/2012 17:02, Kurchi Subhra Hazra wrote:
>
> In this case what happens if someone calls:
> sc.socket.bind(address);
> sc.getLocalAddress();
>
> I am guessing that state will still be ST_UNCONNECTED, and 
> getLocalAddress will return null. Or am I missing something?
The bind method will set localAddress after binding the socket and 
shouldn't need to change. It's possible that after the connection is 
established that the local address will be some specific that the 
address that we explicitly bound to, in which case the logic to set 
localAddress when changing the state to ST_CONNECTED will handle this.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120507/39628fcd/attachment-0001.html 


More information about the nio-dev mailing list