KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
handle_request.c File Reference
#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)
 

Macro Definition Documentation

◆ BUFSIZE

#define BUFSIZE   1024

Referenced by handle_request().

◆ HEADER_BUF_SIZE

#define HEADER_BUF_SIZE   512

Referenced by handle_request().

◆ REQUEST_LINE_SIZE

#define REQUEST_LINE_SIZE   160

Referenced by handle_request().

Function Documentation

◆ exact_match()

bool exact_match ( const char * path,
const char * pattern )

Referenced by handle_request().

◆ handle_request()

◆ prefix_match()

bool prefix_match ( const char * path,
const char * pattern )

Referenced by handle_request().

◆ send_code()

void send_code ( int socket,
uint16_t code,
const char * message )

References message, MSG_NONE, NULL, send(), and socket().

Referenced by handle_request().

◆ send_ok()

int send_ok ( http_state_t * h,
const char * ct )

References buffer, MSG_NONE, send(), and http_state_t::socket.

Referenced by handle_request().