summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorJohnny Richard <johnny@johnnyrichard.com>2022-04-10 02:42:04 +0200
committerJohnny Richard <johnny@johnnyrichard.com>2022-04-10 02:42:04 +0200
commitcfd0f74bb8156a537a9482222be31723420b035e (patch)
tree181aefd9ebf1eff17c39a987258b333ee427f3a2 /main.c
parent2b8ba909c7e24c16f2b7b0c6b738610218d27dee (diff)
Refactor server initialization
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index 5dd3201..121968f 100644
--- a/main.c
+++ b/main.c
@@ -25,8 +25,9 @@
int main() {
sigaction(SIGPIPE, &(struct sigaction){SIG_IGN}, NULL);
- server_t server = server_create(SERVER_PORT);
- server_start(&server);
+ server_t server;
+ server_init(&server, SERVER_PORT);
+ server_run(&server);
return EXIT_SUCCESS;
}