NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Socket Constructor (Int32, Int32, Int32)

Initializes a new instance of the Socket class.

[Visual Basic]
Overloads Public Sub New( _
   ByVal af As Integer, _
   ByVal type As Integer, _
   ByVal pr As Integer _
)
[C#]
public Socket(
   int af,
   int type,
   int pr
);
[C++]
public: Socket(
   int af,
   int type,
   int pr
);
[JScript]
public function Socket(
   af : int,
   type : int,
   pr : int
);

Parameters

af
The address family the socket will use.
type
[To be supplied.]
pr
[To be supplied.]

Exceptions

Exception Type Condition
ArgumentException The combination of address family, socket type, and protocol results in an invalid socket.

Remarks

The address family, socket type, and protocol parameters are not independent. Some address families restrict the protocols that can be used with them, and often the socket type is implicit in the protocol used. If the combination of address family, socket type, and protocol results in and invalid socket, then an exception is thrown.

The valid address families are defined in the AddressFamily class. The valid socket types are defined in the SocketType class. The valid protocol types are defined in the ProtocolType class.

See Also

Socket Class | Socket Members | System.Net.Sockets Namespace | Socket Constructor Overload List