Introduction - If you have any usage issues, please Google them yourself
Event driven (non blocking, asynchronous) Winsock programming is a very complex topic. It is definitely NOT for beginners!
I needed such code and searched the internet for a TCP communication class which is ready to use.
But all I found (even here on CodeProject) was either buggy, immature beginner code or much too complex for my needs.
So I ended up - investing many hours - to write my own decent class.
I offer it here on CodeProject for all those who need a reliable and robust TCP socket class.
What you can download here is a very clean code written by an experienced programmer, with proper error handling and plenty of comments.
The universal generic C++ class cSocket, written in plain C++, comes with a MFC demo application.
The cSocket class is so easy to use that even a beginner will have no problems with it.