cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Modification of curl_multi_fdset()

From: Alexey Simak <alexeysimak_at_gmail.com>
Date: Mon, 9 Jun 2008 18:06:50 +0300

> > 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
> > }
>
> No you can't. The code in the patch you submitted still uses the socket
from
> the read situation and ups the "max socket" number with it so the function
can
> in fact return something else than -1 for max_fd and still not having set
> anything in the write_fd_set.

Hm, cannot agree with you. read_fd_set is NULL here, so nothing is added
to read_fd_set, variable "added" becomes "1" only if something is added to
write_fd_set. So this_max_fd is changed only if write_fd_set is not empty.
Received on 2008-06-09