Closed LasseBlaauwbroek closed 2 months ago
We don't currently have any plans to support IPv6 natively in async. This doesn't preclude you from creating a file_descr
yourself, and then creating an Fd.t
for use with, e.g., Reader.t
and/or Writer.t
. Unfortunately this approach will break down if you ever use the Fd.t
in a module that asks questions about the Fd.t
's address family.
It's a big lift and internally, there is not much of a need for it. I understand that this is an unsatisfying answer, but that's where currently at.
It is not possible to connect to an ipv6 address using
Where_to_connect
when specifying no bind address. It errors out withAddress family not supported by protocol
. This seems to happen becausecreate_bind_any
always uses ipv4: https://github.com/janestreet/async_unix/blob/cc9687df10b2763943002640856329f5052f0b04/src/unix_syscalls.ml#L650 It should instead detect when ipv6 is used and change the address appropriately.