Install curl-7.21.1.tar.bz2
[msysgit.git] / mingw / share / man / man3 / curl_multi_info_read.3
blob9ff08e70783f8eb4fe975772e715125b76542b21
1 .\"
2 .TH curl_multi_info_read 3 "18 Dec 2004" "libcurl 7.10.3" "libcurl Manual"
3 .SH NAME
4 curl_multi_info_read - read multi stack informationals
5 .SH SYNOPSIS
6 #include <curl/curl.h>
8 CURLMsg *curl_multi_info_read( CURLM *multi_handle,
9                                int *msgs_in_queue);
10 .ad
11 .SH DESCRIPTION
12 Ask the multi handle if there are any messages/informationals from the
13 individual transfers. Messages may include informationals such as an error
14 code from the transfer or just the fact that a transfer is completed. More
15 details on these should be written down as well.
17 Repeated calls to this function will return a new struct each time, until a
18 NULL is returned as a signal that there is no more to get at this point. The
19 integer pointed to with \fImsgs_in_queue\fP will contain the number of
20 remaining messages after this function was called.
22 When you fetch a message using this function, it is removed from the internal
23 queue so calling this function again will not return the same message
24 again. It will instead return new messages at each new invoke until the queue
25 is emptied.
27 \fBWARNING:\fP The data the returned pointer points to will not survive
28 calling \fIcurl_multi_cleanup(3)\fP, \fIcurl_multi_remove_handle(3)\fP or
29 \fIcurl_easy_cleanup(3)\fP.
31 The 'CURLMsg' struct is very simple and only contains very basic information.
32 If more involved information is wanted, the particular "easy handle" in
33 present in that struct and can thus be used in subsequent regular
34 \fIcurl_easy_getinfo(3)\fP calls (or similar):
36 .nf
37  struct CURLMsg {
38    CURLMSG msg;       /* what this message means */
39    CURL *easy_handle; /* the handle it concerns */
40    union {
41      void *whatever;    /* message-specific data */
42      CURLcode result;   /* return code for transfer */
43    } data;
44  };
45 .fi
46 When \fBmsg\fP is \fICURLMSG_DONE\fP, the message identifies a transfer that
47 is done, and then \fBresult\fP contains the return code for the easy handle
48 that just completed.
50 At this point, there are no other \fBmsg\fP types defined.
51 .SH "RETURN VALUE"
52 A pointer to a filled-in struct, or NULL if it failed or ran out of
53 structs. It also writes the number of messages left in the queue (after this
54 read) in the integer the second argument points to.
55 .SH "SEE ALSO"
56 .BR curl_multi_cleanup "(3), " curl_multi_init "(3), " curl_multi_perform "(3)"