1 .\" $Id: curl_multi_info_read.3,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
3 .TH curl_multi_info_read 3 "18 Dec 2004" "libcurl 7.10.3" "libcurl Manual"
5 curl_multi_info_read - read multi stack informationals
9 CURLMsg *curl_multi_info_read( CURLM *multi_handle,
13 Ask the multi handle if there are any messages/informationals from the
14 individual transfers. Messages may include informationals such as an error
15 code from the transfer or just the fact that a transfer is completed. More
16 details on these should be written down as well.
18 Repeated calls to this function will return a new struct each time, until a
19 NULL is returned as a signal that there is no more to get at this point. The
20 integer pointed to with \fImsgs_in_queue\fP will contain the number of
21 remaining messages after this function was called.
23 When you fetch a message using this function, it is removed from the internal
24 queue so calling this function again will not return the same message
25 again. It will instead return new messages at each new invoke until the queue
28 \fBWARNING:\fP The data the returned pointer points to will not survive
29 calling \fIcurl_multi_cleanup(3)\fP, \fIcurl_multi_remove_handle(3)\fP or
30 \fIcurl_easy_cleanup(3)\fP.
32 The 'CURLMsg' struct is very simple and only contain very basic information.
33 If more involved information is wanted, the particular "easy handle" in
34 present in that struct and can thus be used in subsequent regular
35 \fIcurl_easy_getinfo(3)\fP calls (or similar):
39 CURLMSG msg; /* what this message means */
40 CURL *easy_handle; /* the handle it concerns */
42 void *whatever; /* message-specific data */
43 CURLcode result; /* return code for transfer */
47 When \fBmsg\fP is \fICURLMSG_DONE\fP, the message identifies a transfer that
48 is done, and then \fBresult\fP contains the return code for the easy handle
51 At this point, there is no other \fBmsg\fP types defined.
53 A pointer to a filled-in struct, or NULL if it failed or ran out of
54 structs. It also writes the number of messages left in the queue (after this
55 read) in the integer the second argument points to.
57 .BR curl_multi_cleanup "(3), " curl_multi_init "(3), " curl_multi_perform "(3)"