After several hours of searching the web and the student MSDN archive in Visual 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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.