Compare commits
2 Commits
f2bbec366b
...
635335831c
| Author | SHA1 | Date | |
|---|---|---|---|
| 635335831c | |||
|
|
cbc6c7fc41 |
@@ -6,7 +6,7 @@
|
|||||||
/* By: iherman- <iherman-@student.42malaga.com +#+ +:+ +#+ */
|
/* By: iherman- <iherman-@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2026/05/06 17:19:12 by iherman- #+# #+# */
|
/* Created: 2026/05/06 17:19:12 by iherman- #+# #+# */
|
||||||
/* Updated: 2026/05/06 17:40:52 by iherman- ### ########.fr */
|
/* Updated: 2026/05/06 18:16:39 by iherman- ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -19,6 +19,9 @@ Server::Server()
|
|||||||
|
|
||||||
Server::Server(int port, const std::string& password)
|
Server::Server(int port, const std::string& password)
|
||||||
{
|
{
|
||||||
|
(port < 1 || port > 65535)
|
||||||
|
throw std::runtime_error("Invalid port");
|
||||||
|
|
||||||
std::cout << "Server port: " << port << "\nServer Password: " << password << std::endl;
|
std::cout << "Server port: " << port << "\nServer Password: " << password << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user