Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to write a Windows based socket client

1 view
Skip to first unread message

Angus

unread,
Oct 21, 2006, 2:33:07 PM10/21/06
to
Hello

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


Scott McPhillips [MVP]

unread,
Oct 21, 2006, 4:57:38 PM10/21/06
to

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]

0 new messages