| 1 |
select([timeout]) -> number of ready file descriptors or 0 on timeout |
| 2 |
|
| 3 |
Returns result from doing a select() on the curl multi file descriptor |
| 4 |
with the given timeout. |
| 5 |
|
| 6 |
This is a convenience function which simplifies the combined use of |
| 7 |
``fdset()`` and the ``select`` module. |
| 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 |
ret = m.select(1.0) |
| 19 |
if ret == 0: continue |
| 20 |
_, num_handles = m.perform() |