public static StunAttribute BuildChangeAddress(IpFamily family, IPAddress ip, ushort port) { var length = family switch { IpFamily.IPv4 => 4, IpFamily.IPv6 => 16, _ => throw new ArgumentOutOfRangeException(nameof(family), family, null) }; return(new StunAttribute { Type = AttributeType.ChangedAddress, Length = (ushort)(4 + length), Value = new ChangedAddressStunAttributeValue { Family = family, Address = ip, Port = port } }); }
public virtual ClusterRule WithIpFamily(IpFamily ipFamily) { this._ipFamily = ipFamily; return(this); }
public EnterpriseClusterIpFamilyIT(DiscoveryServiceType discoveryServiceFactory, IpFamily ipFamily, bool useWildcard) : base(discoveryServiceFactory, ipFamily, useWildcard) { }