How to C# Chat server programming
Network programming in windows is possible with Sockets .The Microsoft .NET framework provides two namespaces, System.Net and System.Net.Sockets for managed implementation of Internet protocols that applications can use to send or receive data over the Internet .
In the previous section C# Multi Threaded Socket Program we can see a C# Multi Threaded Server Socket Program communicate with more than one Client at the same time . But there the communication is occurred between Server to Client or Client to Server , there is no communication between Client to Client . C# Chat Server describes how to a Client can communicate with any number of Clients , currently connected to the Chat Server .
The main idea behind the C# Chat Server is that each Client send messages to the Server and the Server broadcast the message to all Clients currently connected to the Chat Server . From the following picture you can see how a C# TCP Chat Server is handling communication between Client to Client .
C# chat server example
The C# Chat Server program has two sections.
How to run Chat Server program ?
In the Client program, Enter a Chat name and click " 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 Clients at the same time and start chatting each other. If you plan to run more than one client, it is better to copy the .exe file in separate folders and run from the .exe file.
- How to send email from C#
- How to send email with attachment from C#
- How to send html email from C#
- How to send cdo email from C#
- How to find hostname of a computer
- How to find IP Adress of a computer
- How to read URL Content from webserver
- How to C# Socket programming
- C# Server Socket program
- C# Client Socket program
- C# Multi threaded socket programming
- C# Multi threaded Server Socket programming
- C# Multi threaded Client Socket programming
- How to C# Chat Server
- How to C# Chat Client
- How to web browser in C#