pbm with bind and sudo understood, next is port

This commit is contained in:
hugogogo
2022-07-15 22:14:29 +02:00
parent 6b1fd5a15b
commit ca81b6760e
4 changed files with 42 additions and 49 deletions

View File

@@ -14,7 +14,8 @@ int main(void)
{
Webserv serv;
serv.bind(80);
// https://security.stackexchange.com/questions/169213/how-to-chose-a-port-to-run-an-application-on-localhost
serv.bind(8080);
serv.listen(512); // 512 max connections arbitrary
serv.start();
}
@@ -44,7 +45,7 @@ int main(void)
# include <poll.h> // poll
# define INVALID -1
# define PORT 80
# define PORT 1025
# define BACKLOG 20
int main()