Advertisement

Winsock I/O Model :: Winsock

Started by August 24, 2002 09:40 AM
1 comment, last by kuphryn 22 years, 5 months ago
Hi, I have a question that for some could be one of the more challenging part of the design process for most winsock applications using Win32 API winsock tools. However, at the same time it is so fundamental among all winsock applications. I am working on a client winsock program. The client logs onto a server and send and receive data. I am using WAsyncSelect() I/O model. The problem is current I can only program the application to support one client at a time. For example, let say the application is communication. The client sends messages to the server. Currently, the application can only communicate with one server at a time. I would like to be able to connect to multiple servers simultaneously. The problem is I do not know which I/O model is best in the case above. With WAsyncSelect(), Windows manages the I/O notices. For example, if there are incoming data, Windows sends you a message FD_READ. My main concern is if I use this model and assign multiple sockets, how would I know which socket WAsyncSelect() refers to when it sends the application messaging such as FD_READ, FD_WRITE, and FD_CLOSE? What I/O model do you recommend for a client program supporting multiple connections simultaneously? Thanks, Kuphryn
I think there was a similar thread to this a while ago, the socket that caused the FD_READ to be sent is in the wparam or lparam of the message or something...
Advertisement
Okay. Thanks.

Kuphryn

This topic is closed to new replies.

Advertisement