Closed caspChristian closed 9 months ago
Trying to use Host "::1" as server gives: An address incompatible with the requested protocol was use
An address incompatible with the requested protocol was use
This might only need to change https://github.com/cnblogs/EnyimMemcachedCore/blob/main/src/Enyim.Caching/Memcached/PooledSocket.cs#L36-L38
into:
var socket = new Socket(AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp); socket.SetSocketOption(SocketOptionLevel.IPv6, SocketOptionName.IPv6Only, false); socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, true); socket.NoDelay = true;
It should allow any IP, both legacy IPv4 and current IPv6.
Other places where AddressFamily.InterNetwork is used in the code, might need an update as well.
Added support in 2.7.0. Please try it.
Set UseIPv6 option to true
UseIPv6
true
Trying to use Host "::1" as server gives:
An address incompatible with the requested protocol was use
This might only need to change https://github.com/cnblogs/EnyimMemcachedCore/blob/main/src/Enyim.Caching/Memcached/PooledSocket.cs#L36-L38
into:
It should allow any IP, both legacy IPv4 and current IPv6.
Other places where AddressFamily.InterNetwork is used in the code, might need an update as well.