#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include <sys/poll.h>
#include <curl/curl.h>
#include <event2/event.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <errno.h>
Go to the source code of this file.
Classes | |
struct | _ConnInfo |
struct | _GlobalInfo |
struct | _SockInfo |
Defines | |
#define | MSG_OUT stdout /* Send info to stdout, change to stderr if you want */ |
Typedefs | |
typedef struct _ConnInfo | ConnInfo |
typedef struct _GlobalInfo | GlobalInfo |
typedef struct _SockInfo | SockInfo |
Functions | |
static void | addsock (curl_socket_t s, CURL *easy, int action, GlobalInfo *g) |
static void | check_multi_info (GlobalInfo *g) |
static void | clean_fifo (GlobalInfo *g) |
static void | event_cb (int fd, short kind, void *userp) |
static void | fifo_cb (int fd, short event, void *arg) |
static int | init_fifo (GlobalInfo *g) |
int | main (int argc, char **argv) |
static void | mcode_or_die (const char *where, CURLMcode code) |
static int | multi_timer_cb (CURLM *multi, long timeout_ms, GlobalInfo *g) |
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 void | timer_cb (int fd, short kind, void *userp) |
static size_t | write_cb (void *ptr, size_t size, size_t nmemb, void *data) |
Variables | |
static const char * | fifo = "hiper.fifo" |
Definition at line 74 of file hiperfifo.c.
typedef struct _GlobalInfo GlobalInfo |
static void addsock | ( | curl_socket_t | s, |
CURL * | easy, | ||
int | action, | ||
GlobalInfo * | g | ||
) | [static] |
Definition at line 252 of file hiperfifo.c.
static void check_multi_info | ( | GlobalInfo * | g | ) | [static] |
Definition at line 153 of file hiperfifo.c.
static void clean_fifo | ( | GlobalInfo * | g | ) | [static] |
Definition at line 405 of file hiperfifo.c.
static void event_cb | ( | int | fd, |
short | kind, | ||
void * | userp | ||
) | [static] |
Definition at line 181 of file hiperfifo.c.
static void fifo_cb | ( | int | fd, |
short | event, | ||
void * | arg | ||
) | [static] |
Definition at line 351 of file hiperfifo.c.
static int init_fifo | ( | GlobalInfo * | g | ) | [static] |
Definition at line 374 of file hiperfifo.c.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 412 of file hiperfifo.c.
static void mcode_or_die | ( | const char * | where, |
CURLMcode | code | ||
) | [static] |
Definition at line 127 of file hiperfifo.c.
static int multi_timer_cb | ( | CURLM * | multi, |
long | timeout_ms, | ||
GlobalInfo * | g | ||
) | [static] |
Definition at line 114 of file hiperfifo.c.
static void new_conn | ( | char * | url, |
GlobalInfo * | g | ||
) | [static] |
Definition at line 316 of file hiperfifo.c.
static int prog_cb | ( | void * | p, |
double | dltotal, | ||
double | dlnow, | ||
double | ult, | ||
double | uln | ||
) | [static] |
Definition at line 303 of file hiperfifo.c.
Definition at line 221 of file hiperfifo.c.
static void setsock | ( | SockInfo * | f, |
curl_socket_t | s, | ||
CURL * | e, | ||
int | act, | ||
GlobalInfo * | g | ||
) | [static] |
Definition at line 233 of file hiperfifo.c.
static int sock_cb | ( | CURL * | e, |
curl_socket_t | s, | ||
int | what, | ||
void * | cbp, | ||
void * | sockp | ||
) | [static] |
Definition at line 262 of file hiperfifo.c.
static void timer_cb | ( | int | fd, |
short | kind, | ||
void * | userp | ||
) | [static] |
Definition at line 205 of file hiperfifo.c.
static size_t write_cb | ( | void * | ptr, |
size_t | size, | ||
size_t | nmemb, | ||
void * | data | ||
) | [static] |
Definition at line 292 of file hiperfifo.c.
const char* fifo = "hiper.fifo" [static] |
Definition at line 373 of file hiperfifo.c.