#include <sys/stat.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "mongoose.h"
Go to the source code of this file.
Defines | |
#define | SSE_CONNECTION ((void *) 1) |
Functions | |
static void | elog (int do_exit, const char *fmt,...) |
static int | exists (const char *path) |
static int | is_local_file (const char *uri, char *path, size_t path_len) |
static int | is_resource_present_locally (const char *uri) |
int | main (int argc, char *argv[]) |
static int | proxy_event_handler (struct mg_connection *conn, enum mg_event ev) |
static void | setopt (struct mg_server *s, const char *opt, const char *val) |
static void | signal_handler (int sig_num) |
static int | sse_push (struct mg_connection *conn, enum mg_event ev) |
static void * | sse_pusher_thread_func (void *param) |
static int | try_to_serve_locally (struct mg_connection *conn) |
Variables | |
static int | s_received_signal = 0 |
static struct mg_server * | s_server = NULL |
#define SSE_CONNECTION ((void *) 1) |
Definition at line 33 of file proxy_server.c.
static void elog | ( | int | do_exit, |
const char * | fmt, | ||
... | |||
) | [static] |
Definition at line 35 of file proxy_server.c.
static int exists | ( | const char * | path | ) | [static] |
Definition at line 66 of file proxy_server.c.
static int is_local_file | ( | const char * | uri, |
char * | path, | ||
size_t | path_len | ||
) | [static] |
Definition at line 72 of file proxy_server.c.
static int is_resource_present_locally | ( | const char * | uri | ) | [static] |
Definition at line 103 of file proxy_server.c.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 162 of file proxy_server.c.
static int proxy_event_handler | ( | struct mg_connection * | conn, |
enum mg_event | ev | ||
) | [static] |
Definition at line 108 of file proxy_server.c.
Definition at line 155 of file proxy_server.c.
static void signal_handler | ( | int | sig_num | ) | [static] |
Definition at line 44 of file proxy_server.c.
static int sse_push | ( | struct mg_connection * | conn, |
enum mg_event | ev | ||
) | [static] |
Definition at line 49 of file proxy_server.c.
static void* sse_pusher_thread_func | ( | void * | param | ) | [static] |
Definition at line 56 of file proxy_server.c.
static int try_to_serve_locally | ( | struct mg_connection * | conn | ) | [static] |
Definition at line 78 of file proxy_server.c.
int s_received_signal = 0 [static] |
Definition at line 30 of file proxy_server.c.
Definition at line 31 of file proxy_server.c.