After several hours of searching the web and the student MSDN archive in Visual Studio.net i cannot figure out through the random blabber of sample codes how to do basic connections using TCP socket connections through a client and a listener. I got the jist that winsock had become outdated to Microsoft and they attempted something new, but it all seems to complicated for microsoft to have done. If anyone can point me in the right direction on basic TCP connections, much thanks to ya.

12 Years
Discussion Span
Last Post by lee_suko

Ok i have figured out the basics but now im running into a different issue.

Dim address As new IPAddress()
Dim port As Integer = Val(txtport.text)
Dim EndPoint As New IPEndPoint(address, port)

when i try to enter an ipaddress such as directly into the ipendpoint, it doesnt accept it, and putting an ipaddress into a long doesnt work either, im at a stall point here of how to get txtip.text into the endpoint...


Once again with a little time and effort, i figured out the issue, now i cant figure out this one. Using the code provided form the MSDN archive, i altered it ecept the lines with "e" in them.

Catch e As Exception
Console.WriteLine("Winsock error: " & e.ToString())
End Try

It says "Variable 'e' hides a variable in an enclosing block." I have no idea how to fix this.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.