Merge worker .h files

This commit is contained in:
2022-12-29 22:00:32 +01:00
parent 5d27cf0398
commit db966b3a66
13 changed files with 35 additions and 95 deletions

View File

@ -65,15 +65,15 @@ bin/async.o: src/async.h src/logger.h
bin/workers.o: src/workers.h src/lib/mpmc.h src/worker/*.h
bin/worker/request_handler.o: src/worker/request_handler.h
bin/worker/request_handler.o: src/worker/func.h
bin/worker/tcp_acceptor.o: src/worker/tcp_acceptor.h
bin/worker/tcp_acceptor.o: src/worker/func.h
bin/worker/tcp_closer.o: src/worker/tcp_closer.h
bin/worker/tcp_closer.o: src/worker/func.h
bin/worker/fastcgi_handler.o: src/worker/fastcgi_handler.h
bin/worker/fastcgi_handler.o: src/worker/func.h
bin/worker/responder.o: src/worker/responder.h
bin/worker/responder.o: src/worker/func.h
bin/lib/compress.o: src/lib/compress.h

View File

@ -6,7 +6,7 @@
* @date 2022-12-28
*/
#include "fastcgi_handler.h"
#include "func.h"
#include "../logger.h"
#include "../lib/utils.h"

View File

@ -1,16 +0,0 @@
/**
* sesimos - secure, simple, modern web server
* @brief TCP closer (header file)
* @file src/worker/fastcgi_handler.h
* @author Lorenz Stechauner
* @date 2022-12-29
*/
#ifndef SESIMOS_FASTCGI_HANDLER_H
#define SESIMOS_FASTCGI_HANDLER_H
#include "../server.h"
void fastcgi_handler_func(client_ctx_t *ctx);
#endif //SESIMOS_FASTCGI_HANDLER_H

24
src/worker/func.h Normal file
View File

@ -0,0 +1,24 @@
/**
* sesimos - secure, simple, modern web server
* @brief Worker function header file
* @file src/worker/func.h
* @author Lorenz Stechauner
* @date 2022-12-29
*/
#ifndef SESIMOS_FUNC_H
#define SESIMOS_FUNC_H
#include "../server.h"
void tcp_acceptor_func(client_ctx_t *ctx);
void tcp_closer_func(client_ctx_t *ctx);
void request_handler_func(client_ctx_t *ctx);
void responder_func(client_ctx_t *ctx);
void fastcgi_handler_func(client_ctx_t *ctx);
#endif //SESIMOS_FUNC_H

View File

@ -7,7 +7,7 @@
*/
#include "../defs.h"
#include "request_handler.h"
#include "func.h"
#include "../workers.h"
#include "../lib/mpmc.h"
#include "../logger.h"

View File

@ -1,16 +0,0 @@
/**
* sesimos - secure, simple, modern web server
* @brief Client request handler (header file)
* @file src/worker/request_handler.h
* @author Lorenz Stechauner
* @date 2022-12-28
*/
#ifndef SESIMOS_REQUEST_HANDLER_H
#define SESIMOS_REQUEST_HANDLER_H
#include "../server.h"
void request_handler_func(client_ctx_t *ctx);
#endif //SESIMOS_REQUEST_HANDLER_H

View File

@ -7,7 +7,7 @@
*/
#include "../defs.h"
#include "responder.h"
#include "func.h"
#include "../async.h"
#include "../logger.h"

View File

@ -1,16 +0,0 @@
/**
* sesimos - secure, simple, modern web server
* @brief HTTP responder (header file)
* @file src/worker/responderr.h
* @author Lorenz Stechauner
* @date 2022-12-29
*/
#ifndef SESIMOS_RESPONDER_H
#define SESIMOS_RESPONDER_H
#include "../server.h"
void responder_func(client_ctx_t *ctx);
#endif //SESIMOS_RESPONDER_H

View File

@ -6,7 +6,7 @@
* @date 2022-12-28
*/
#include "tcp_acceptor.h"
#include "func.h"
#include "../async.h"
#include "../logger.h"
#include "../lib/mpmc.h"

View File

@ -1,16 +0,0 @@
/**
* sesimos - secure, simple, modern web server
* @brief TCP acceptor (header file)
* @file src/worker/tcp_acceptor.h
* @author Lorenz Stechauner
* @date 2022-12-28
*/
#ifndef SESIMOS_TCP_ACCEPTOR_H
#define SESIMOS_TCP_ACCEPTOR_H
#include "../server.h"
void tcp_acceptor_func(client_ctx_t *ctx);
#endif //SESIMOS_TCP_ACCEPTOR_H

View File

@ -6,7 +6,7 @@
* @date 2022-12-28
*/
#include "tcp_closer.h"
#include "func.h"
#include "../logger.h"
#include "../lib/utils.h"

View File

@ -1,16 +0,0 @@
/**
* sesimos - secure, simple, modern web server
* @brief TCP closer (header file)
* @file src/worker/tcp_closer.h
* @author Lorenz Stechauner
* @date 2022-12-28
*/
#ifndef SESIMOS_TCP_CLOSER_H
#define SESIMOS_TCP_CLOSER_H
#include "../server.h"
void tcp_closer_func(client_ctx_t *ctx);
#endif //SESIMOS_TCP_CLOSER_H

View File

@ -9,11 +9,7 @@
#include "workers.h"
#include "lib/mpmc.h"
#include "worker/tcp_acceptor.h"
#include "worker/tcp_closer.h"
#include "worker/responder.h"
#include "worker/request_handler.h"
#include "worker/fastcgi_handler.h"
#include "worker/func.h"
static mpmc_t tcp_acceptor_ctx, tcp_closer_ctx, request_handler_ctx, responder_ctx, fastcgi_handler_cxt;