A tutorial on Chat Server and Chat Client in VB.net

By: Issac Viewed: 153594 times  Printer Friendly Format    


Multithreaded Socket Programming is the basic idea behind a TCP Chat Server communication. A Multithreaded Server Socket Program communicates with more than one Client at the same time. But there the communication is happening only between Server to Client or Client to Server, there is no communication between Client to Client. In a Multithreaded Chat Server, a Client can communicate with any number of Clients, currently connected on the Chat Server.



Each Client sends messages to the Server and the Server broadcasts the message to all Clients that are currently connected to the Chat Server. From the following figure you can see how a VB.NET TCP Chat Server is handling communication between Client to Client.

vb.net_chat_programming.JPG


How to run Chat Server program?

After creating the Chat Server and Chat Client programs we have to run the Server program first and then run the Client program. In the Client program enter a Chat name and click the “Connect to Server “button. Then you can see the message in the Server program User Joined Chat Room. Similarly you can connect more than one Client at the same time and start chatting each other. It is better to Compile and Build the program and run from the .exe files.

Sample Code for Chat server in VB.net

Sample Code for Chat client in VB.net



Most Viewed Articles (in VB.net )

Latest Articles (in VB.net)

Comment on this tutorial

Subscribe to Tutorials

Related Tutorials

Archived Comments

1. VERY HELPFUL TO ME AND MY FRIENDS.
THANK YO

View Tutorial          By: mansi at 2009-12-23 00:35:43

2. I like men
View Tutorial          By: Ashley Wood at 2010-11-10 03:38:38

3. Yes, as @ Mansi said it's really helpful.
I

View Tutorial          By: Eko SW at 2011-06-22 23:38:22

4. thank you very much.
View Tutorial          By: hadi at 2011-10-20 14:14:39

5. [English]
Good morning ... the question ari

View Tutorial          By: Federico at 2012-06-01 13:55:13

6. Dorothynob
View Tutorial          By: Dorothynob at 2017-03-06 19:24:47