Click here to Skip to main content
15,881,173 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.2K   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

 
GeneralRe: Chat With US DI <<< Liggity Lame Pin
Anonymous7-Jun-05 15:59
Anonymous7-Jun-05 15:59 
GeneralThread Data Pin
Ken Mazaika5-Aug-02 11:52
Ken Mazaika5-Aug-02 11:52 
QuestionHow to make it work Pin
26-Jun-02 20:31
suss26-Jun-02 20:31 
AnswerRe: How to make it work Pin
tomdekok21-Jul-02 1:31
tomdekok21-Jul-02 1:31 
AnswerRe: How to make it work Pin
ahkeR8-Mar-07 7:45
ahkeR8-Mar-07 7:45 
GeneralClient Server Chat Pin
Munty5410-May-02 19:37
Munty5410-May-02 19:37 
GeneralRe: Client Server Chat Pin
bamaruckmani27-Sep-04 19:11
sussbamaruckmani27-Sep-04 19:11 
GeneralThank you!!!! Pin
12-Mar-02 22:20
suss12-Mar-02 22:20 
Thank you;Thank you;Thank you!!!!!!!!!!!!!;P Poke tongue | ;-P
GeneralRe: Thank you!!!! Pin
tomdekok21-Jul-02 1:33
tomdekok21-Jul-02 1:33 
GeneralYou have memory leaks Pin
11-Dec-01 16:00
suss11-Dec-01 16:00 
Generalhelp if you can Pin
16-Oct-01 5:18
suss16-Oct-01 5:18 
Generalquestion Pin
25-Sep-01 19:11
suss25-Sep-01 19:11 
GeneralThank you Pin
23-Jul-01 4:44
suss23-Jul-01 4:44 
Generalnumber of users on this application Pin
8-Jun-01 4:35
suss8-Jun-01 4:35 
GeneralExplaination Pin
Maria Jothi29-May-01 19:46
Maria Jothi29-May-01 19:46 
GeneralRe: Explaination Pin
zarzor3-Dec-02 15:07
zarzor3-Dec-02 15:07 
GeneralThank You very much Pin
4-Apr-01 20:56
suss4-Apr-01 20:56 
QuestionHow to know when the ConnectionRequest occurs Pin
20-Mar-01 18:54
suss20-Mar-01 18:54 
AnswerRe: How to know when the ConnectionRequest occurs Pin
Member 1480673-Aug-02 16:08
Member 1480673-Aug-02 16:08 

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.