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:
5
main.cpp
5
main.cpp
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user