#include <glib.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <curl/curl.h>
Go to the source code of this file.
|
static void | addsock (curl_socket_t s, CURL *easy, int action, GlobalInfo *g) |
|
static void | check_multi_info (GlobalInfo *g) |
|
static gboolean | event_cb (GIOChannel *ch, GIOCondition condition, gpointer data) |
|
static gboolean | fifo_cb (GIOChannel *ch, GIOCondition condition, gpointer data) |
|
int | init_fifo (void) |
|
int | main (int argc, char **argv) |
|
static void | mcode_or_die (const char *where, CURLMcode code) |
|
static void | new_conn (char *url, GlobalInfo *g) |
|
static int | prog_cb (void *p, double dltotal, double dlnow, double ult, double uln) |
|
static void | remsock (SockInfo *f) |
|
static void | setsock (SockInfo *f, curl_socket_t s, CURL *e, int act, GlobalInfo *g) |
|
static int | sock_cb (CURL *e, curl_socket_t s, int what, void *cbp, void *sockp) |
|
static gboolean | timer_cb (gpointer data) |
|
static int | update_timeout_cb (CURLM *multi, long timeout_ms, void *userp) |
|
static size_t | write_cb (void *ptr, size_t size, size_t nmemb, void *data) |
|
◆ BUF_SIZE
◆ MSG_OUT
#define MSG_OUT g_print /* Change to "g_error" to write to stderr */ |
◆ SHOW_PROGRESS
#define SHOW_PROGRESS 0 /* Set to non-zero to enable progress callback */ |
◆ SHOW_VERBOSE
#define SHOW_VERBOSE 0 /* Set to non-zero for libcurl messages */ |
◆ ConnInfo
◆ GlobalInfo
◆ SockInfo
◆ addsock()
◆ check_multi_info()
◆ event_cb()
static gboolean event_cb |
( |
GIOChannel * |
ch, |
|
|
GIOCondition |
condition, |
|
|
gpointer |
data |
|
) |
| |
|
static |
◆ fifo_cb()
static gboolean fifo_cb |
( |
GIOChannel * |
ch, |
|
|
GIOCondition |
condition, |
|
|
gpointer |
data |
|
) |
| |
|
static |
◆ init_fifo()
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
◆ mcode_or_die()
static void mcode_or_die |
( |
const char * |
where, |
|
|
CURLMcode |
code |
|
) |
| |
|
static |
◆ new_conn()
static void new_conn |
( |
char * |
url, |
|
|
GlobalInfo * |
g |
|
) |
| |
|
static |
◆ prog_cb()
static int prog_cb |
( |
void * |
p, |
|
|
double |
dltotal, |
|
|
double |
dlnow, |
|
|
double |
ult, |
|
|
double |
uln |
|
) |
| |
|
static |
◆ remsock()
◆ setsock()
◆ sock_cb()
◆ timer_cb()
static gboolean timer_cb |
( |
gpointer |
data | ) |
|
|
static |
◆ update_timeout_cb()
static int update_timeout_cb |
( |
CURLM * |
multi, |
|
|
long |
timeout_ms, |
|
|
void * |
userp |
|
) |
| |
|
static |
◆ write_cb()