Mentalis.org Security Library documentation

VirtualSocket Constructor (AddressFamily, SocketType, ProtocolType)

Initializes a new instance of the VirtualSocket class.

[Visual Basic]
Overloads Public Sub New( _
   ByVal addressFamily As AddressFamily, _
   ByVal socketType As SocketType, _
   ByVal protocolType As ProtocolType _
)
[C#]
public VirtualSocket(
   AddressFamily addressFamily,
   SocketType socketType,
   ProtocolType protocolType
);

Parameters

addressFamily
One of the AddressFamily values.
socketType
One of the SocketType values.
protocolType
One of the ProtocolType values.

Remarks

The addressFamily parameter specifies the addressing scheme that the VirtualSocket uses, the socketType parameter specifies the type of the VirtualSocket, and protocolType specifies the protocol used by the VirtualSocket. 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 VirtualSocket, a SocketException is thrown.
The AddressFamily enumeration defines the valid address families, the SocketType enumeration defines the valid socket types, and the ProtocolType enumeration defines the valid protocol types.

Exceptions

Exception TypeCondition
SocketExceptionThe combination of addressFamily, socketType, and protocolType results in an invalid socket.

See Also

VirtualSocket Class | VirtualSocket Members | Org.Mentalis.Security.Ssl Namespace | VirtualSocket Constructor Overload List