// // Created by epagris on 2023.11.22.. // #include #include "http_server.h" #include "../dynmem.h" #include "../utils.h" #include "../prefab/conn_blocks/tcp_connblock.h" #include "../global_state.h" HttpServer *http_new(ip4_addr addr, uint16_t port) { // acquire interface EthInterface * intf = get_interface_by_address(addr); if (intf == NULL) { ERROR("Unknown interface!\n"); return NULL; } // allocate instance HttpServer * http = (HttpServer *) dynmem_alloc(sizeof(HttpServer)); ASSERT_NULL(http); // open server connection //http->serverConn = tcp_new_connblock(intf, addr, port, ); return http; }