Imports System.IO
Imports System.Net
Imports System.Text
Imports System.Net.Sockets
public class MainClass
Shared Sub Main()
'Uses the IP address and port number to establish a socket connection.
Dim udpClient As New UdpClient()
Dim ipAddress As IPAddress = Dns.Resolve("www.domain.com").AddressList(0)
Try
udpClient.Connect(ipAddress, 11003)
Catch e As Exception
Console.WriteLine(e.ToString())
End Try
End Sub
End Class