Click here to Skip to main content
15,886,788 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.4K   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

 
AnswerRe: how to make one application work as a server and client simultaneously Pin
Destiny7779-Feb-13 12:54
Destiny7779-Feb-13 12:54 
GeneralTransmit Image File Pin
Keel15-Jan-04 20:15
Keel15-Jan-04 20:15 
GeneralIPnr in list box Pin
JockeP24-Aug-03 18:41
JockeP24-Aug-03 18:41 
GeneralBind Error Pin
Hazem Nasereddin7-Jan-03 2:54
Hazem Nasereddin7-Jan-03 2:54 
GeneralRe: Bind Error Pin
kaizer25-Jun-03 5:45
kaizer25-Jun-03 5:45 
GeneralRe: Bind Error Pin
asimrehan131-Mar-13 8:47
asimrehan131-Mar-13 8:47 
GeneralThanks... Pin
Mustafa Bayer4-Dec-02 8:45
Mustafa Bayer4-Dec-02 8:45 
GeneralChat With US DI Pin
DCUtility26-Nov-02 16:56
professionalDCUtility26-Nov-02 16:56 
An other great chat!

http://www.codeproject.com/useritems/ChatWithUS.asp

- The hell is paved good intentions.
GeneralRe: Chat With US DI <<< Liggity Lame Pin
Anonymous4-Dec-02 6:57
Anonymous4-Dec-02 6:57 
GeneralRe: Chat With US DI <<< Liggity Lame Pin
DCUtility5-Dec-02 3:30
professionalDCUtility5-Dec-02 3:30 
GeneralRe: Chat With US DI &lt;&lt;&lt; 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 
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 

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.