Initializes a new instance of the Socket class using the specified address family, socket type and protocol.
Assembly: System.Net (in System.Net.dll)
'Declaration Public Sub New ( _ addressFamily As AddressFamily, _ socketType As SocketType, _ protocolType As ProtocolType _ )
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.
The following example creates an instance of the Socket class.
' Create a socket and connect to the server Dim sock As Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) AddHandler socketEventArg.Completed, AddressOf SocketEventArg_Completed socketEventArg.RemoteEndPoint = hostEntry socketEventArg.UserToken = sock sock.ConnectAsync(socketEventArg)
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.