Macros | Functions | Variables
proxy_server.c File Reference
#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"
Include dependency graph for proxy_server.c:

Go to the source code of this file.

Macros

#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_servers_server = NULL
 

Macro Definition Documentation

#define SSE_CONNECTION   ((void *) 1)

Definition at line 33 of file proxy_server.c.

Function Documentation

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.

static void setopt ( struct mg_server s,
const char *  opt,
const char *  val 
)
static

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.

Variable Documentation

int s_received_signal = 0
static

Definition at line 30 of file proxy_server.c.

struct mg_server* s_server = NULL
static

Definition at line 31 of file proxy_server.c.



rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:17