I have been researching how to write a socket client to a socket server I
have already written. The socket server uses IO Completion ports and all
that complicated stuff. I am starting to write the client in VC++ and am
looking for some pointers as to how to get started.
So to be clear I want to write a Windows socket client program.
1. I should use the WSAAsyncSelect model which sends network events as
windows messages?
2. I will then NOT need to spin off a separate thread to handle network
communication?
I know about the MFC CAsyncSocket class but I don't use MFC. Is anyone
aware of any non-MFC AsyncSelect based socket classes?
Any other tips?
Angus
1. Yes, if your program is a GUI with a message pump.
2. Correct, there is no need to put an async socket in a separate thread.
I don't know of a non-MFC class, but if you have VC++ you can look at
the CAsyncSocket source code and modify it to suit.
--
Scott McPhillips [VC++ MVP]