On 08/10/2019 15:20, mark sheppard wrote:
:

Q: is  localAddress.getPort() == 0   indicative that the DatagramChannel is 
unbound ?

getLocalAddress() returns a SocketAddress when bound, it returns null when not bound. I don't think we should get too hung up on corner case that arises when the local port cannot be restored (by re-binding). The javadoc sets the expectations that the channel's socket is in an undefined state when disconnect fails.

-Alan.

Reply via email to