Socket Constructor

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Initializes a new instance of the Socket class using the specified address family, socket type and protocol.

Namespace:  System.Net.Sockets
Assembly:  System (in System.dll)

	AddressFamily addressFamily, 
	SocketType socketType, 
	ProtocolType protocolType


Type: System.Net.Sockets..::..AddressFamily
One of the AddressFamily values.
Type: System.Net.Sockets..::..SocketType
One of the SocketType values.
Type: System.Net.Sockets..::..ProtocolType
One of the ProtocolType values.

The addressFamily parameter specifies the addressing scheme that the Socket class uses, the socketType parameter specifies the type of the Socket class, and the protocolType parameter specifies the protocol used by Socket. The three parameters are not independent. Some address families restrict which protocols can be used with them, and often the Socket type is implicit in the protocol. If the combination of address family, Socket type, and protocol type results in an invalid Socket, this constructor throws a SocketException.