mirror of
https://github.com/Mercantec-GHC/h4-projekt-gruppe-0-sm.git
synced 2025-05-05 11:24:06 +02:00
20 lines
380 B
C
20 lines
380 B
C
#pragma once
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
typedef struct HttpServer HttpServer;
|
|
|
|
typedef struct {
|
|
uint16_t port;
|
|
size_t worker_threads;
|
|
} HttpServerOpts;
|
|
|
|
/// On error, returns NULL and prints.
|
|
HttpServer* http_server_new(HttpServerOpts opts);
|
|
void http_server_free(HttpServer* server);
|
|
|
|
/// On error, returns -1;
|
|
int http_server_listen(HttpServer* server);
|
|
|