implemented MAX_CONNECTIONS

This commit is contained in:
Václav Šmejkal 2023-02-09 19:44:55 +01:00
parent 01770f1f8d
commit 7b51acba52
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -41,7 +41,7 @@ int main(void)
if (bind(listen_socket, (SA *) &server_addr, sizeof(server_addr)) < 0) why2_die("Failed binding socket.");
//LISTEN
if (listen(listen_socket, 1) < 0) why2_die("Binding failed.");
if (listen(listen_socket, MAX_CONNECTIONS) < 0) why2_die("Binding failed.");
//LOOP ACCEPT
for (;;)