| 1 |
fdset() -> tuple of lists with active file descriptors, readable, writeable, exceptions |
| 2 |
|
| 3 |
Returns a tuple of three lists that can be passed to the select.select() method. |
| 4 |
|
| 5 |
Corresponds to `curl_multi_fdset`_ in libcurl. This method extracts the |
| 6 |
file descriptor information from a CurlMulti object. The returned lists can |
| 7 |
be used with the ``select`` module to poll for events. |
| 8 |
|
| 9 |
Example usage:: |
| 10 |
|
| 11 |
import pycurl |
| 12 |
c = pycurl.Curl() |
| 13 |
c.setopt(pycurl.URL, "https://curl.haxx.se") |
| 14 |
m = pycurl.CurlMulti() |
| 15 |
m.add_handle(c) |
| 16 |
_, num_handles = m.perform() |
| 17 |
while num_handles: |
| 18 |
apply(select.select, m.fdset() + (1,)) |
| 19 |
_, num_handles = m.perform() |
| 20 |
.. _curl_multi_fdset: |
| 21 |
https://curl.haxx.se/libcurl/c/curl_multi_fdset.html |