Closed palant closed 1 week ago
Correction: this already is an issue. The TcpSocketOptions
structure has been extended already, there changes merely aren’t released yet.
Thanks for reporting. This fix will be included in one of the upcoming syncs.
What is the problem your feature solves, or the need it fulfills?
An application setting
TcpSocketOptions::ipv6_only
flag will often cause an error to be logged. That might be because the application misinterpreted the address as IPv6 (cannot set the flag on IPv4 addresses), or because the OS doesn’t support this flag (seems to be the case for BSD-based operating systems). This means: the application shouldn’t have to choose if it doesn’t really want to.This isn’t a problem right now because
TcpSocketOptions
only contains one field – if an application doesn’t want to setipv6_only
flag, it callsadd_tcp
instead ofadd_tcp_with_settings
. ShouldTcpSocketOptions
be extended as planned in future, this will become a problem however.Describe the solution you'd like
This field should have
Option<bool>
as its type, withNone
keeping the system’s default behavior. The latter is always safe.