/usr/share/doc/python-pycurl/html/curlmultiobject.html is in python-pycurl 7.19.3-0ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | <?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PycURL: CurlMulti Objects</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="revisit-after" content="30 days" />
<meta name="robots" content="noarchive, index, follow" />
</head>
<body>
<h1>CurlMulti Object</h1>
<p>CurlMulti objects have the following methods: </p>
<dl>
<dt><code>close()</code> -> <em>None</em></dt>
<dd>
<p>Corresponds to
<a href="http://curl.haxx.se/libcurl/c/curl_multi_cleanup.html"><code>curl_multi_cleanup()</code></a> in libcurl.
This method is automatically called by pycurl when a CurlMulti object no
longer has any references to it, but can also be called
explicitly.</p>
</dd>
<dt><code>perform()</code> -> <em>tuple of status and the number of active Curl objects</em></dt>
<dd>
<p>Corresponds to
<a href="http://curl.haxx.se/libcurl/c/curl_multi_perform.html"><code>curl_multi_perform()</code></a> in libcurl.</p>
</dd>
<dt><code>add_handle(</code><em>Curl object</em><code>) </code>-> <em>None</em></dt>
<dd>
<p>Corresponds to
<a href="http://curl.haxx.se/libcurl/c/curl_multi_add_handle.html"><code>curl_multi_add_handle()</code></a> in libcurl.
This method adds an existing and valid Curl object to the CurlMulti
object.</p>
<p>IMPORTANT NOTE: add_handle does not implicitly add a Python reference
to the Curl object (and thus does not increase the reference count on the Curl
object).</p>
</dd>
<dt><code>remove_handle(</code><em>Curl object</em><code>)</code> -> <em>None</em></dt>
<dd>
<p>Corresponds to
<a href="http://curl.haxx.se/libcurl/c/curl_multi_remove_handle.html"><code>curl_multi_remove_handle()</code></a> in libcurl.
This method removes an existing and valid Curl object from the CurlMulti
object.</p>
<p>IMPORTANT NOTE: remove_handle does not implicitly remove a Python reference
from the Curl object (and thus does not decrease the reference count on the Curl
object).</p>
</dd>
<dt><code>fdset()</code> ->
<em>triple of lists with active file descriptors,
readable, writeable, exceptions.</em></dt>
<dd>
<p>Corresponds to
<a href="http://curl.haxx.se/libcurl/c/curl_multi_fdset.html"><code>curl_multi_fdset()</code></a> in libcurl.
This method extracts the file descriptor information from a CurlMulti object.
The returned lists can be used with the <code>select</code> module to
poll for events.</p>
<p>Example usage:</p>
<pre>
import pycurl
c = pycurl.Curl()
c.setopt(pycurl.URL, "http://curl.haxx.se")
m = pycurl.CurlMulti()
m.add_handle(c)
while 1:
ret, num_handles = m.perform()
if ret != pycurl.E_CALL_MULTI_PERFORM: break
while num_handles:
apply(select.select, m.fdset() + (1,))
while 1:
ret, num_handles = m.perform()
if ret != pycurl.E_CALL_MULTI_PERFORM: break
</pre>
</dd>
<dt><code>select(</code><em>timeout</em><code>)</code> ->
<em>number of ready file descriptors or -1 on timeout</em></dt>
<dd>
<p>This is a convenience function which simplifies the combined
use of <code>fdset()</code> and the <code>select</code> module.</p>
<p>Example usage:</p>
<pre>import pycurl
c = pycurl.Curl()
c.setopt(pycurl.URL, "http://curl.haxx.se")
m = pycurl.CurlMulti()
m.add_handle(c)
while 1:
ret, num_handles = m.perform()
if ret != pycurl.E_CALL_MULTI_PERFORM: break
while num_handles:
ret = m.select(1.0)
if ret == -1: continue
while 1:
ret, num_handles = m.perform()
if ret != pycurl.E_CALL_MULTI_PERFORM: break
</pre>
</dd>
<dt><code>info_read(</code><em>[max]</em><code>)</code> ->
<em>numberof queued messages, a list of successful objects, a list of
failed objects</em></dt>
<dd>
<p>Corresponds to the
<a href="http://curl.haxx.se/libcurl/c/curl_multi_info_read.html"><code>curl_multi_info_read()</code></a> function in libcurl.
This method extracts at most <em>max</em> messages
from the multi stack and returns them in two lists. The first
list contains the handles which completed successfully and the second
list contains a tuple <em><curl object, curl error number, curl
error message></em> for each failed curl object. The number
of queued messages after this method has been called is also
returned.</p>
</dd>
</dl>
<hr />
<p>
<a href="http://validator.w3.org/check/referer"><img align="right"
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0!" height="31" width="88" border="0" /></a>
</p>
</body>
</html>
|