5,699,997 members and growing! (16,558 online)
Email Password   helpLost your password?
Languages » C / C++ Language » General     Intermediate

Chat Client Server

By Boby Thomas P

An implementation of chat client and server with win32 sockets.
C++, Windows, Visual Studio, Dev

Posted: 6 May 2006
Updated: 19 May 2007
Views: 42,216
Bookmarked: 30 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
41 votes for this Article.
Popularity: 5.81 Rating: 3.60 out of 5
3 votes, 7.3%
1
3 votes, 7.3%
2
4 votes, 9.8%
3
4 votes, 9.8%
4
27 votes, 65.9%
5
Note: This is an unedited contribution. If this article is inappropriate, needs attention or copies someone else's work without reference then please Report This Article

Sample Image - chat_client_server.jpg

Introduction

Recently I got myself introduced with socket programming. I read through many books and articles to get an insight into the subject. After learning a bit, I decided to share my knowledge with the world. For this purpose, I created a simple console based chat application. I hope this will be a good reference code for C++ socket programming. I am going to introduce the following concepts to you here.

· Sockets.

· Multi threading.

What is Chat Client Server?

The demo project given along with this article consists of two console-based applications.

Chat Server

Chat server is an application, which does the following operations.

· Listens for incoming calls from clients. Client running in any pc can connect to the server if IP address of the server is known.

· Listens for messages from all the connected clients.

· Broadcast the message from clients to all the clients connected to the server.

· You can also type-in messages in the server, which will be broadcasted to all the clients.

Chat Client

Chat client does the following things.

· Send messages to server as well as all the connected the clients.

· View the messages from all the clients and server.

Please download the pdf document to read rest of the article. I have made a pdf because the article consists of 2-3 diagrams.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Boby Thomas P


Check my homepage for more details - Click Here

I love designing and programming and am working now on Puzzles and Sudoku
Location: India India

Other popular C / C++ Language articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 16 of 16 (Total in Forum: 16) (Refresh)FirstPrevNext
GeneralC cde for chat servermemberavinashk141:08 29 Aug '08  
GeneralI want to implement a chat server/clientmemberricha.cseit4:58 28 Feb '08  
QuestionWant to develop a chat clientmemberdipuThegr819:16 14 Nov '07  
Generalwchar_tmemberMan_cool20:42 9 Jul '07  
QuestionError?memberXHungChung1:33 10 Nov '06  
AnswerRe: Error?memberBoby Thomas P1:37 10 Nov '06  
Generalbehavior after cable break Win2k/ WinxpmemberBennet Yee21:13 12 May '06  
Generali have an ideamembernoise@BUPT16:52 9 May '06  
GeneralRe: i have an ideamemberBoby Thomas P22:22 9 May '06  
Generalintegration of projectmemberdimas7510:54 7 May '06  
GeneralRe: integration of projectmembermysterious_caveman11:43 10 Jun '07  
Generalthanksmemberraul_sfk1:48 7 May '06  
GeneralRe: thanksmemberBoby Thomas P9:56 7 May '06  
Generalinfo requiredmemberSunithaC1:43 7 May '06  
GeneralRe: info requiredmemberBoby Thomas P9:56 7 May '06  
GeneralRe: info requiredmemberroninttk23:13 9 May '06  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 19 May 2007
Editor:
Copyright 2006 by Boby Thomas P
Everything else Copyright © CodeProject, 1999-2008
Web10 | Advertise on the Code Project