|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
#include <stdio.h>#include <string.h>#include <stdlib.h>#include <unistd.h>#include <kos/fs.h>#include "speedtest.h"Macros | |
| #define | BUFSIZE 1024 |
| #define | REQUEST_LINE_SIZE 160 |
| #define | HEADER_BUF_SIZE 512 |
Functions | |
| bool | exact_match (const char *path, const char *pattern) |
| bool | prefix_match (const char *path, const char *pattern) |
| int | send_ok (http_state_t *h, const char *ct) |
| void | send_code (int socket, uint16_t code, const char *message) |
| void * | handle_request (void *p) |
| #define BUFSIZE 1024 |
Referenced by handle_request().
| #define HEADER_BUF_SIZE 512 |
Referenced by handle_request().
| #define REQUEST_LINE_SIZE 160 |
Referenced by handle_request().
| bool exact_match | ( | const char * | path, |
| const char * | pattern ) |
Referenced by handle_request().
| void * handle_request | ( | void * | p | ) |
References http_state_t::body, BUFSIZE, data, exact_match(), free(), fs_close(), fs_open(), fs_read(), HEADER_BUF_SIZE, http_state_t::method, METHOD_GET, METHOD_POST, MSG_NONE, NULL, http_state_t::path, prefix_match(), printf, http_state_t::read_content_length, recv(), http_state_t::rem_content_length, REQUEST_LINE_SIZE, send(), send_code(), send_ok(), http_state_t::socket, and uint32_t().
Referenced by server_thread().
| bool prefix_match | ( | const char * | path, |
| const char * | pattern ) |
Referenced by handle_request().
| void send_code | ( | int | socket, |
| uint16_t | code, | ||
| const char * | message ) |
| int send_ok | ( | http_state_t * | h, |
| const char * | ct ) |
References buffer, MSG_NONE, send(), and http_state_t::socket.
Referenced by handle_request().