Sign in to follow this  
Jary

Equivalent of poll() in Winsock ?

Recommended Posts

Jary    122
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

Share this post


Link to post
Share on other sites
Jary    122
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 !

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this