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

« back to all changes in this revision

Viewing changes to docs/examples/multi-debugcallback.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:
118
118
  http_handle = curl_easy_init();
119
119
 
120
120
  /* set the options (I left out a few, you'll get the point anyway) */
121
 
  curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.haxx.se/");
 
121
  curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/");
122
122
 
123
123
  curl_easy_setopt(http_handle, CURLOPT_DEBUGFUNCTION, my_trace);
124
124
  curl_easy_setopt(http_handle, CURLOPT_VERBOSE, 1L);
130
130
  curl_multi_add_handle(multi_handle, http_handle);
131
131
 
132
132
  /* we start some action by calling perform right away */
133
 
  while(CURLM_CALL_MULTI_PERFORM ==
134
 
        curl_multi_perform(multi_handle, &still_running));
 
133
  curl_multi_perform(multi_handle, &still_running);
135
134
 
136
135
  while(still_running) {
137
136
    struct timeval timeout;
181
180
    case 0:
182
181
    default:
183
182
      /* timeout or readable/writable sockets */
184
 
      while(CURLM_CALL_MULTI_PERFORM ==
185
 
            curl_multi_perform(multi_handle, &still_running));
 
183
      curl_multi_perform(multi_handle, &still_running);
186
184
      break;
187
185
    }
188
186
  }