in this code:

VB Code:
  1. Try
  2.       client = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
  3.       port = RemotePort
  4.       ipHostInfo = Dns.Resolve(RemoteHostName)
  5.       ipAddress = ipHostInfo.AddressList(0)
  6.       Dim remoteEP As New IPEndPoint(ipAddress, port)
  7.       client.BeginConnect(remoteEP, AddressOf sockConnected, client)
  8.     Catch
  9.       RaiseEvent onError(index, Err.Description)
  10.       Exit Sub
  11.     End Try

the line 'ipHostInfo = Dns.Resolve(RemoteHostName)' takes about 5 seconds to do it. anybody knows how can i take it of?

i am working only with ip address, so i don't need to resolve it.

Thank you,
Guilherme Costa