public InternetEndPoint(int port, System.Net.Sockets.AddressFamily addressFamily, System.Net.Sockets.ProtocolType protocolType, System.Net.Sockets.ProtocolFamily protocolFamily) : base(protocolType, protocolFamily) { if (port < System.Net.IPEndPoint.MinPort || port > System.Net.IPEndPoint.MaxPort) { throw new System.ArgumentOutOfRangeException("port"); } m_Port = port; }
public InternetEndPoint(int port, System.Net.Sockets.AddressFamily addressFamily, System.Net.SocketAddress socketAddress, System.Net.Sockets.ProtocolType protocolType, System.Net.Sockets.ProtocolFamily protocolFamily) : this(port, addressFamily, protocolType, protocolFamily) { if (socketAddress == null) { throw new System.ArgumentNullException("socketAddress"); } if (false.Equals(socketAddress.Family == AddressFamily)) { throw new System.InvalidOperationException("AddressFamily must match the socketAddress.Family"); } SocketAddress = socketAddress; }
public DnsEndPoint(string host, int port, System.Net.Sockets.AddressFamily addressFamily, System.Net.Sockets.ProtocolType protocolType, System.Net.Sockets.ProtocolFamily protocolFamily) : base(port, addressFamily, protocolType, protocolFamily) { if (string.IsNullOrWhiteSpace(host)) { throw new System.ArgumentException("Cannot be null or consist only of whitespace", "host"); } if (false.Equals(m_Family == System.Net.Sockets.AddressFamily.InterNetwork) && false.Equals(m_Family == System.Net.Sockets.AddressFamily.InterNetworkV6)) { throw new System.ArgumentException("Invalid Address Family", "addressFamily"); } m_Host = host; m_Family = addressFamily; }
public SocketEndPoint(System.Net.Sockets.ProtocolType protocolType, System.Net.Sockets.ProtocolFamily protocolFamily) : this(protocolType) { ProtocolFamily = protocolFamily; }