curl-library
Re: Modification of curl_multi_fdset()
Date: Mon, 9 Jun 2008 15:28:39 +0300
> > 1) curl_multi_fdset does not fill exc_fd_set.
> Uhm, why would it need to do that?
We call curl_multi_fd_set() to fill fd_sets and then pass them to select().
We need to track errors on sockets so we have to pass the exceptfds
argument to select also. So curl_multi_fdset() should fill exc_fd_set
from my point of view.
BTW: why this argument is defined in curl_multi_fdset?
> > 2) we need to know if there is any fd in write_fd_set,
> > returned from curl_multi_fdset.
> I don't see how your patch lets you "know" this any more than it
previously
> did. Can you elaborate?
With new version of curl_multi_fd_set() we can use the next scenario:
int max_fd = -1;
curl_multi_fdset( handle, NULL, write_fd_set, NULL, &max_fd);
if ( max_fd != -1 ) {
// some of socket was added to write_fd_set
}
Received on 2008-06-09