A tutorial on Chat Server and Chat Client in VB.net
By: Issac
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.
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
Archived Comments
1. Dorothynob
View Tutorial By: Dorothynob at 2017-03-06 19:24:47
2. [English]
Good morning ... the question arises in the following, when I start the server and
View Tutorial By: Federico at 2012-06-01 13:55:13
3. thank you very much.
View Tutorial By: hadi at 2011-10-20 14:14:39
4. Yes, as @ Mansi said it's really helpful.
I have done the same functionality in a j2me using
View Tutorial By: Eko SW at 2011-06-22 23:38:22
5. I like men
View Tutorial By: Ashley Wood at 2010-11-10 03:38:38
6. VERY HELPFUL TO ME AND MY FRIENDS.
THANK YOU SO MUCH.
View Tutorial By: mansi at 2009-12-23 00:35:43
Comment on this tutorial
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Related Tutorials
Using Resume Next and Resume Line in VB.net
Using On Error GoTo 0 in VB.net
Getting an Exception's Number and Description in VB.net
Raising an Exception Intentionally in VB.net
Exception Filtering in the Catch Block in VB.net
Using Multiple Catch Statements in VB.net
Throwing an Exception in VB.net
Throwing a Custom Exception in VB.net
Changes in Controls from VB6 to VB.net
Unstructured Exception Handling in VB.net