implemented MAX_CONNECTIONS
This commit is contained in:
parent
01770f1f8d
commit
7b51acba52
@ -41,7 +41,7 @@ int main(void)
|
|||||||
if (bind(listen_socket, (SA *) &server_addr, sizeof(server_addr)) < 0) why2_die("Failed binding socket.");
|
if (bind(listen_socket, (SA *) &server_addr, sizeof(server_addr)) < 0) why2_die("Failed binding socket.");
|
||||||
|
|
||||||
//LISTEN
|
//LISTEN
|
||||||
if (listen(listen_socket, 1) < 0) why2_die("Binding failed.");
|
if (listen(listen_socket, MAX_CONNECTIONS) < 0) why2_die("Binding failed.");
|
||||||
|
|
||||||
//LOOP ACCEPT
|
//LOOP ACCEPT
|
||||||
for (;;)
|
for (;;)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user