Click here to Skip to main content
15,889,116 members
Articles / Desktop Programming / MFC
Article

Chat program

Rate me:
Please Sign up or sign in to vote.
4.42/5 (38 votes)
2 Dec 2002 285.6K   8.7K   58   53
Simple chat program.

Sample Image - CSocket.jpg

Introduction

This very simple Chat program was written by using VC++ 6 under Windows 2000. CSocketCli program creates a client socket. CSocket program creates a server socket. If you run the client program, you must specify the address of the other computer in the IP Address editbox in "the server program".

If the client is running but the server isn't running, you will receive an error in the editbox down in the client program, but if you connect you will receive "Connected" message in the chat editbox in the client program.

When you run the server, you don't need to do any thing; just wait until some client program connects with the server. This program handles multiple clients and you can have private chat with friends.

Important note: If you run the Client and the Server in the same computer, please write in the client IP Address textbox the address 127.0.0.1, then press Connect button and you will be connected to the server.

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


Written By
Software Developer (Senior)
Saudi Arabia Saudi Arabia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionRealmente Bueno: Aún funciona con Windows 10. Pin
pamopamo13-Aug-23 23:23
pamopamo13-Aug-23 23:23 
Questionwoooooooooooooooooooooooooooow Pin
Member 1504767416-Jan-21 5:08
Member 1504767416-Jan-21 5:08 
QuestionHello! Pin
Member 103101355-Oct-13 3:06
Member 103101355-Oct-13 3:06 
QuestionThank you for easy to follow code for Client and Server Sides... Pin
Destiny7779-Feb-13 12:46
Destiny7779-Feb-13 12:46 
GeneralFirewall Pin
AlexEvans21-Aug-10 23:22
AlexEvans21-Aug-10 23:22 
GeneralRe: Firewall Pin
Destiny7779-Feb-13 12:41
Destiny7779-Feb-13 12:41 
Questionhow are you Pin
cen_jin_long22-Feb-10 12:41
cen_jin_long22-Feb-10 12:41 
GeneralDownload = 0kb Pin
codeinelogic8-Jan-09 7:53
codeinelogic8-Jan-09 7:53 
GeneralRe: Download = 0kb Pin
codeinelogic8-Jan-09 8:02
codeinelogic8-Jan-09 8:02 
GeneralThank you. Pin
Member 232736913-May-08 22:01
Member 232736913-May-08 22:01 
Generalhome edition Pin
vishal dhir24-Feb-07 20:16
vishal dhir24-Feb-07 20:16 
Questionhow to use it in campus Pin
Member 368157930-Dec-06 0:05
Member 368157930-Dec-06 0:05 
Questionhow to use it in campus Pin
Member 368157930-Dec-06 0:04
Member 368157930-Dec-06 0:04 
Questionwhat is socket programming Pin
mahili19-Nov-06 21:28
mahili19-Nov-06 21:28 
AnswerRe: what is socket programming Pin
kkyaw8823-Feb-07 10:45
kkyaw8823-Feb-07 10:45 
Generalvery usefull Pin
fserdary9-Aug-06 4:51
fserdary9-Aug-06 4:51 
Generalgood code Pin
Sujitmatrix2-May-06 4:21
Sujitmatrix2-May-06 4:21 
Generalexcellent sample code Pin
Thomas Abegglen22-Mar-06 22:15
Thomas Abegglen22-Mar-06 22:15 
nice work u've submitted
fairly simple to figure out

but for some people, it'd be nice if u
- formatted code im a more readable format
- included comments
- gave variables a more meaningful name
(i know it was last updated in 2002, but hey its still pretty useful)

apart from that, nice work *thumbs up*
GeneralCMD Pin
Pablo9836-Mar-06 11:37
Pablo9836-Mar-06 11:37 
Generalgood job~~ Pin
rosenus12-Feb-06 4:58
rosenus12-Feb-06 4:58 
GeneralCheck the status Wether Connect to the internet or not Pin
Kutti Ra30-Sep-05 23:07
Kutti Ra30-Sep-05 23:07 
Generalover the internet Pin
12-Mar-05 5:44
suss12-Mar-05 5:44 
GeneralRe: over the internet Pin
Xiaozhou Ye6-Nov-05 21:10
Xiaozhou Ye6-Nov-05 21:10 
Questionhow to make one application work as a server and client simultaneously Pin
syaks29-Nov-04 7:19
syaks29-Nov-04 7:19 
AnswerRe: how to make one application work as a server and client simultaneously Pin
Destiny7779-Feb-13 12:54
Destiny7779-Feb-13 12:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.