SocketChannel connect blocks in non-blocking mode
Didac Vega Bru
dvb.soln at gmail.com
Mon Sep 18 21:59:33 UTC 2023
Hello Bernd,
thank you for your answer. I agree that it is logical that non-blocking
operation refers only to the actual socket operation.
I guess that I missed the fact that InetSocketAddress is the actual
object doing the actual name resolution and therefore I can do it
separately.
Best regards
Didac V.
On 18/09/2023 23:28, Bernd wrote:
> The non-blocking refers only to socket operations, resolving the
> address is logically outside (it helps to think about C API I guess
> where the connect gets a resolved address). If you want to async
> resolve the address you would have to do that separetly (or do it in
> its own thread since async resolvers are tricky)
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
> ------------------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/nio-dev/attachments/20230918/59ad83a8/attachment-0001.htm>
More information about the nio-dev
mailing list