doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
persistant.c
Go to the documentation of this file.
1 /*****************************************************************************
2  * _ _ ____ _
3  * Project ___| | | | _ \| |
4  * / __| | | | |_) | |
5  * | (__| |_| | _ <| |___
6  * \___|\___/|_| \_\_____|
7  *
8  * $Id: persistant.c,v 1.2 2003/11/19 08:20:13 bagder Exp $
9  */
10 
11 #include <stdio.h>
12 #include <unistd.h>
13 #include <curl/curl.h>
14 
15 int main(int argc, char **argv)
16 {
17  CURL *curl;
18  CURLcode res;
19 
21 
22  curl = curl_easy_init();
23  if(curl) {
24  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
25  curl_easy_setopt(curl, CURLOPT_HEADER, 1);
26 
27  /* get the first document */
28  curl_easy_setopt(curl, CURLOPT_URL, "http://curl.haxx.se/");
29  res = curl_easy_perform(curl);
30 
31  /* get another document from the same server using the same
32  connection */
33  curl_easy_setopt(curl, CURLOPT_URL, "http://curl.haxx.se/docs/");
34  res = curl_easy_perform(curl);
35 
36  /* always cleanup */
37  curl_easy_cleanup(curl);
38  }
39 
40  return 0;
41 }
CURLcode curl_global_init(long flags)
Globally initializes cURL given a bitwise set of the different features to initialize.
Definition: easy.c:147
CURLcode curl_easy_perform(CURL *curl)
Definition: easy.c:260
CURLcode
Definition: curl.h:209
CURLcode curl_easy_setopt(CURL *curl, CURLoption option,...)
Definition: easy.c:217
int main(int argc, char **argv)
Definition: persistant.c:15
void CURL
Definition: types.h:25
GLuint res
Definition: glext.h:5385
#define CURL_GLOBAL_ALL
Definition: curl.h:1153
void curl_easy_cleanup(CURL *curl)
Definition: easy.c:288
CURL * curl_easy_init(void)
Definition: easy.c:195