VB.NET Multiple TCP/IP Socket Connections

HackeR_54

New member
Joined
Nov 30, 2006
Messages
3
Programming Experience
1-3
Hi!

I need someone help me get started with a basic server / client "chat program" and the server needs to be able to handle multiple connections, I havent found any good examples. I have coded in VB6 before and VB.NET is not the same as VB6 :)

VS2005 / VB.NET

Thank you.
 
Ok! What I need after testing the code that you posted Raven65 I have a few needs. :rolleyes:

I need the connections to be able to stay open all the time (until disconnect)

I need to be able to send out data to all connections from the server e.g

For i = 0 to numconnections
TCPClient.Write("Hello To all of you!")
Next



Thats about what I have right now that I need to get started.
 
That being the case, you are also going to need to research Threading, or at least, the Background Worker (Start with the Background Worker, it's easier and should be able to acomplish what you've described).

Reason being, if you open the TCPListener it will default to the GUI thread, so, if you don't close it, you'll lock your form and not be able to update its contents.

As I warned in my other post, you get into some complex stuff really quick, but it's a rewarding study, and we're here to help.
 
Back
Top