problem in socket connection
For some reason, I can't get any results out of attempting to connect. No error messages or anything.
The socket code looks like this:
Code:
Dim sock As Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
connection code:
Code:
Try
sock.Connect(start_host, index)
txtResults.Text = txtResults.Text + index + " " + "Connected\n"
Catch ex As Exception
txtResults.Text = ex.ToString()
End Try
start_host is an IPAddress Object and index is the current port number.
The IPAddress is created like this:
Code:
Try
start_host = New IPAddress(parse_ip(txtStartHost.Text))
Catch ex As Exception
txtStartHost.Text = "Invalid Address"
End Try
I don't get any error messages at all!!! Neither do I get any results. I know it must be something stupid, but I just don't see it right now. Any help would be appreciated.
Re: problem in socket connection
Sorry men, it was some other related code that caused there error... I have it working now.