Back again!
I’ve been doing some async socket programming with select() on windows,and it’s been working quite well. However it’s only scalable up to 1024 clients.Poll() is the way to get around that limitation, and I know it works on both linux and unix. But it doesn’t work with a windows system correct?
I read about WsaPoll(), does it have the exact same functionality? What libraries would I have to link to in order to use it?
Can I increase the socket number safely in windows with FD_SETSIZE? My end program will be on a linux server. However I am testing on a windows system right now. Should I just swap my test machine over to a linux box? (probably going to anyway)
Otherwise what would you recommend to use with windows?
(sorry for all of the questions, I am doing research on my own, I promise =D)
Yes
WSAPoll()behaves likepoll(). You will need to useWSAGetLastErrorto figure out what goes wrong. The error codes don’t match up and depending on the WindowsSDK and your system version the posix codes may or may not be defined in the winsock2 header.To use
WSAPollyou must include the winsock2.h and link to ws2_32.lib and run the application on Windows Vista/Server 2008 and up.However having
WSAPollin your code won’t always stop it from compiling on Windows XP and you will instead get an error when you start your application.If you don’t intend to run your application on Windows then I recommend skipping the SDK, build, dll, and Windows version pain and setting up a Linux vm to develop on.