Establishes a default remote host using the specified host name and port number.
Imports System.IO
Imports System.Net
Imports System.Text
Imports System.Net.Sockets
publicclass MainClass
Shared Sub Main()
'Uses a host name and port number to establish a socket connection.
Dim udpClient As New UdpClient()
Try
udpClient.Connect("www.domain.com", 11002)
Catch e As Exception
Console.WriteLine(e.ToString())
End Try
End Sub
End Class