So im going to try and write a simple instant message program using MFC. Basically, Im wondering the concept of how the client server process works. I need to write a server that is its own seperate .exe, then a client which contains the gui and the information to contact the server? Any tips would be helpful, thanks.

Recommended Answers

All 5 Replies

Thats not mfc

Doesn't matter. If you know both concepts it should be easy to combine them.
We're NOT here to hand you everything on a golden platter.

You make it sound as if I was asking for source code. Ive already got a server program going, and am working on a client to connect. I was just looking for someone who knows some MFC to lend me some tips or advice. As of now, Im stuck on trying to connect ot me server. Reread OP.

There are basically two methods of interaction for MFC.
AFXSocket (which is the MFC implementation of winsock2) or socket (C-Style library for winsock2)

First you need to set up your method of communication, then choose which type of transmission protocol (TCP/UDP) and finally decide on your application protocol (how it receives/parses/transmits messages)

For more information than that I recommend you use Google as there are plenty of tutorials out there for both afx and standard sockets.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.