Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vb.net UDP client

Status
Not open for further replies.

d0s

Programmer
Apr 15, 2004
48
US
Hello, does anyone know how i can make a vb.net app to connect to a server on a certain port and read from files to display on the vb app?? Im wanting to make a gaming config program that will display the game servers current config by reading the .cfg files and going to make it to where i can edit it through the program. I pretty much already know how to read/write to files ect.. but im wondering how i can get my program to connect to the server. I just want it to do a simple udp connection, i tried tcp but it refused it so i think im stuck with just a udp request. Ive read through all sorts of tutorials, and they have helped me grasp the idea of sockets, but i still need more help on getting my program to connect. Thanks
 
First let me point out the nature of UDP disallows a "connection" as it is a connection-less protocol. Because of this UDP does not guarantee that the packets arrive in the correct order - or at all, which could cause problems and why most programs use TCP.

You said when you tried TCP that the connection was refused. The first thing I would check here is firewalls. That is the most common cause of problems like that. Other common causes include the server not listening and the physical network being down between the two computers.

That said here is a component that should take the complexity out of .NET socket programming (TCP or UDP):
I hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top