~ubuntu-branches/ubuntu/saucy/curl/saucy-201307251546

« back to all changes in this revision

Viewing changes to docs/examples/multi-post.c

  • Committer: Bazaar Package Importer
  • Author(s): Ramakrishnan Muthukrishnan
  • Date: 2010-10-18 11:13:17 UTC
  • mto: (3.6.1 experimental) (1.3.1)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20101018111317-9rkas34ecwtq0upn
Tags: upstream-7.21.2
ImportĀ upstreamĀ versionĀ 7.21.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
  if(curl && multi_handle) {
59
59
 
60
60
    /* what URL that receives this POST */
61
 
    curl_easy_setopt(curl, CURLOPT_URL,
62
 
                     "http://www.fillinyoururl.com/upload.cgi");
 
61
    curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/upload.cgi");
63
62
    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
64
63
 
65
64
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
67
66
 
68
67
    curl_multi_add_handle(multi_handle, curl);
69
68
 
70
 
    while(CURLM_CALL_MULTI_PERFORM ==
71
 
          curl_multi_perform(multi_handle, &still_running));
 
69
    curl_multi_perform(multi_handle, &still_running);
72
70
 
73
71
    while(still_running) {
74
72
      struct timeval timeout;
118
116
      default:
119
117
        /* timeout or readable/writable sockets */
120
118
        printf("perform!\n");
121
 
        while(CURLM_CALL_MULTI_PERFORM ==
122
 
              curl_multi_perform(multi_handle, &still_running));
 
119
        curl_multi_perform(multi_handle, &still_running);
123
120
        printf("running: %d!\n", still_running);
124
121
        break;
125
122
      }