|
Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
|
Provides a minimal loopback static server for serving UCAL build artifacts and route-mapped files directly from a build root. More...
#include <arpa/inet.h>#include <errno.h>#include <netinet/in.h>#include <signal.h>#include <stddef.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/socket.h>#include <sys/stat.h>#include <sys/types.h>#include <unistd.h>Go to the source code of this file.
Functions | |
| static int | send_all (int fd, const char *buf, size_t len) |
| static char * | read_file (const char *path, size_t *len_out) |
| static int | path_has_parent_reference (const char *path) |
| static const char * | content_type_for_path (const char *path) |
| static int | resolve_direct_asset (const char *root, const char *path, char *file_path, size_t file_path_len, char *content_type, size_t content_type_len) |
| static int | lookup_route_map (const char *root, const char *path, char *artifact, size_t artifact_len, char *content_type, size_t content_type_len) |
| static void | handle_client (int client, const char *root) |
| Serves one loopback client request from the UCAL build root. | |
| int | main (int argc, char **argv) |
| Starts the minimal UCAL loopback static server. | |
Provides a minimal loopback static server for serving UCAL build artifacts and route-mapped files directly from a build root.
Definition in file ucal_static_server.c.
|
static |
Definition at line 51 of file ucal_static_server.c.
Referenced by resolve_direct_asset().
|
static |
Serves one loopback client request from the UCAL build root.
Definition at line 122 of file ucal_static_server.c.
References lookup_route_map(), read_file(), resolve_direct_asset(), and send_all().
Referenced by main().
|
static |
Definition at line 78 of file ucal_static_server.c.
Referenced by handle_client().
| int main | ( | int | argc, |
| char ** | argv ) |
Starts the minimal UCAL loopback static server.
Definition at line 178 of file ucal_static_server.c.
References handle_client().
|
static |
Definition at line 47 of file ucal_static_server.c.
Referenced by resolve_direct_asset().
|
static |
Definition at line 29 of file ucal_static_server.c.
Referenced by handle_client().
|
static |
Definition at line 67 of file ucal_static_server.c.
References content_type_for_path(), and path_has_parent_reference().
Referenced by handle_client().
|
static |