Added a basic Server::run function which listens for one connection and sends the data back, added listen call to server constructor

This commit is contained in:
iherman-
2026-05-07 13:52:42 +02:00
parent 0c29c50e23
commit 4beabead01
3 changed files with 32 additions and 6 deletions

View File

@@ -6,7 +6,7 @@
/* By: iherman- <iherman-@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/05/06 17:57:53 by iherman- #+# #+# */
/* Updated: 2026/05/07 12:44:36 by iherman- ### ########.fr */
/* Updated: 2026/05/07 13:28:09 by iherman- ### ########.fr */
/* */
/* ************************************************************************** */
@@ -39,12 +39,11 @@ int main(int argc, char *argv[])
{
int port = get_port(argv[1]);
Server server(port, argv[2]);
server.run();
}
catch (std::exception& e)
{
std::cerr << e.what() << std::endl;
return 1;
}
// run server
}