Description: 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.
To Search:
File list (Check if you may need any files):
TCP Socket 1.6
TCP Socket 1.6\Release
TCP Socket 1.6\Release\SocketDemo.exe
TCP Socket 1.6\Documentation.chm
TCP Socket 1.6\resource.h
TCP Socket 1.6\Socket.cpp
TCP Socket 1.6\Socket.h
TCP Socket 1.6\SocketDemo.clw
TCP Socket 1.6\SocketDemo.cpp
TCP Socket 1.6\SocketDemo.h
TCP Socket 1.6\SocketDemo.rc
TCP Socket 1.6\SocketDemoDlg.cpp
TCP Socket 1.6\SocketDemoDlg.h
TCP Socket 1.6\SocketDemo_MBCS.dsp
TCP Socket 1.6\SocketDemo_MBCS.dsw
TCP Socket 1.6\SocketDemo_UNICODE.dsp
TCP Socket 1.6\SocketDemo_UNICODE.dsw
TCP Socket 1.6\StdAfx.cpp
TCP Socket 1.6\StdAfx.h
TCP Socket 1.6\WinSock FAQ.chm
TCP Socket 1.6\_CleanDirectory.cmd
TCP Socket 1.6\SocketDemo_2005.sln
TCP Socket 1.6\SocketDemo_2005.vcproj