From d4c41cc1c9195d5843d3ff1519636f4519e33fa9 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Thu, 20 May 2021 21:29:45 +0200 Subject: reworked server logic, handles responses properly now --- src/server.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/server.h') diff --git a/src/server.h b/src/server.h index 1751fae..d4ecf49 100644 --- a/src/server.h +++ b/src/server.h @@ -20,6 +20,8 @@ #include +#include + #include "dns.h" #include "log.h" #include "database.h" @@ -37,13 +39,8 @@ static int sock_server; void server_start ( server_config_t* _config ); -int server_get_socket ( char* _bind_ip, uint16_t _bind_port ); +void server_handle_connection ( int _socket, database_t* _zone_db ); -int handle_connection ( int _socket, - struct sockaddr_in *sockaddr_client, - socklen_t sockaddr_client_len, - char* _buffer, - int _bufflen, - database_t* _zone_db ); +int server_get_socket ( char* _bind_ip, uint16_t _bind_port ); void signal_term ( ); -- cgit v1.2.3