Equivalent of poll() in Winsock ?
Hello,
I'm writting a program with sockets, I am actually recieving data, with select, (I have more than one socket). I would like to use POLLOUT and poll() to check which socket is less busy, to use it to send data, or split between the different sockets. But when I try to compile in VC++, (using winsock2.h) it doesn't find poll() and pollout. I don't have either sys/poll.h.
I'm wondering if there is an equivalent of poll() / pollout in the Winsock2.h, otherwise if it is possible to get poll.h, or if there is another way to check for the socket which is the less busy (ready to send data).
I thank you a lot in advance.
Jary
Windows does not have the poll() system call. You can get the amount of queued data on a socket by using ioctlsocket() on Windows.
Thanks.
Just wondering, MSG_DONTWAIT doesn't work with windows ? It says "identifier not declared" :-(
Just wondering, MSG_DONTWAIT doesn't work with windows ? It says "identifier not declared" :-(
Been using select() to recieve data, it works fine with FD_ISSET. Thanks :-)
Now i'm wondering how to check if the sending buffer is empty or not (busy or not), or well look for all the buffer, and define which one is empty (busy).
I found only MSG_DONTWAIT but it's for Unix, and I can't find any equivalent for winsocks :/ Is select() also right for choosing sockets to send data with please ?
Thanks for help again !
Now i'm wondering how to check if the sending buffer is empty or not (busy or not), or well look for all the buffer, and define which one is empty (busy).
I found only MSG_DONTWAIT but it's for Unix, and I can't find any equivalent for winsocks :/ Is select() also right for choosing sockets to send data with please ?
Thanks for help again !
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement