You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In relation to PRs #16 & #19, SyslogTcpClient now contains a fair chunk of lower level code that deals with the vagaries of older .NET versions' sketchy TCP API support. It's possible that more code like this will be required in future, to support edge cases on different platforms, so to help keep SyslogTcpClient maintainable and approachable, some refactoring is needed.
This keeps us "standard" where possible, and will also result in simplifing SyslogTcpSink, keeping code at a higher level where it doesn't have to deal with the vagaries of older .NET versions' sketchy support.
In relation to Server Listening on TCP IPv6 Does Not Receive Messages #13 and accompanying fix Support TCP IPv6 #16, we should also consider simplifying platform-dependant configuration of TcpClient for dual-mode IPv4/IPv6 support and buidling hostAddresses just once in the ctor (so it is always a single endpoint on non-Windows platforms, but may be a list on Windows). Probably just move the logic to a SyslogTcpClient private method:
If config.Host is already an IP address, just use it as-is. Otherwise:
On Windows: resolve 1..n IPs with Dns.GetHostAddresses, ensuring both IPv4 and IPv6 addresses are possible
On Linux: resolve only 1 IP with Dns.GetHostAddresses, ensuring both IPv4 and IPv6 addresses are possible (at present, if keep-alives are enabled on Linux, it will only resolve IPv4 IPs - now we support IPv6 connections, we should permit resolution of IPv6 addresses here too)
The text was updated successfully, but these errors were encountered:
If it's relevant, in AWS Lambda IPV6 is not available so the initialization that hardcodes that protocol prevents the library from being used. Would be cool if the protocol was configurable or had a fallback if the "Address family not supported by protocol" exception is thrown.
In relation to PRs #16 & #19,
SyslogTcpClient
now contains a fair chunk of lower level code that deals with the vagaries of older .NET versions' sketchy TCP API support. It's possible that more code like this will be required in future, to support edge cases on different platforms, so to help keepSyslogTcpClient
maintainable and approachable, some refactoring is needed.In relation to Call to AuthenticateAsClientAsync() Hangs When Server Doesn't Support TLS #18 and accompanying fix Implement Timeout for AuthenticateAsClientAsync #19, we should move this timeout wrapper to an
SslStream
extension method. That extension method should use the out-of-the-boxAuthenticateAsClientAsync
(withCancellationToken
support) for .NET Core 2.1+ and .NET 5+, and fall back to the timeout wrapper only fornet462
andnetstandard2.0
.This keeps us "standard" where possible, and will also result in simplifing
SyslogTcpSink
, keeping code at a higher level where it doesn't have to deal with the vagaries of older .NET versions' sketchy support.In relation to Server Listening on TCP IPv6 Does Not Receive Messages #13 and accompanying fix Support TCP IPv6 #16, we should also consider simplifying platform-dependant configuration of
TcpClient
for dual-mode IPv4/IPv6 support and buidlinghostAddresses
just once in the ctor (so it is always a single endpoint on non-Windows platforms, but may be a list on Windows). Probably just move the logic to aSyslogTcpClient
private method:config.Host
is already an IP address, just use it as-is. Otherwise:Dns.GetHostAddresses
, ensuring both IPv4 and IPv6 addresses are possibleDns.GetHostAddresses
, ensuring both IPv4 and IPv6 addresses are possible (at present, if keep-alives are enabled on Linux, it will only resolve IPv4 IPs - now we support IPv6 connections, we should permit resolution of IPv6 addresses here too)The text was updated successfully, but these errors were encountered: