style(core): Uniform all the prefix
This commit is contained in:
parent
41e56955cd
commit
5c980ec086
2 changed files with 10 additions and 8 deletions
|
|
@ -6,22 +6,24 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/05/13 11:03:13 by rparodi #+# #+# */
|
||||
/* Updated: 2025/05/13 11:03:16 by rparodi ### ########.fr */
|
||||
/* Updated: 2025/05/13 11:56:50 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <iostream>
|
||||
#include "core.hpp"
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc != 3) {
|
||||
std::cerr << CLR_RED << "Usage: " << argv[0] << " <port> <password>" << CLR_RESET << std::endl;
|
||||
return 1;
|
||||
}
|
||||
if (DEBUG) {
|
||||
std::cout << CLR_GREY << "Port:\t\t" << CLR_GREEN << argv[1] << CLR_RESET << std::endl;
|
||||
std::cout << CLR_GREY << "Password:\t" << CLR_GREEN << argv[2] << CLR_RESET << std::endl;
|
||||
unsigned short int tmp_port = valid_port(argv[1]);
|
||||
if (tmp_port == 0) {
|
||||
std::cerr << CLR_RED << "Error: Invalid port: " << argv[1] << CLR_RESET << std::endl;
|
||||
return 1;
|
||||
}
|
||||
Server server(tmp_port, argv[2]);
|
||||
while (1)
|
||||
;
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/05/13 11:11:07 by rparodi #+# #+# */
|
||||
/* Updated: 2025/05/13 11:19:18 by rparodi ### ########.fr */
|
||||
/* Updated: 2025/05/13 12:00:55 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -18,8 +18,8 @@
|
|||
*/
|
||||
Server::Server() : _port(0), _password("") {
|
||||
if (DEBUG)
|
||||
std::cerr << CLR_MAGENTA << "[DEBUG] Thanks to use the constructor with port and password !" << std::endl;
|
||||
std::cout << CLR_GREY << "[INFO] Server default constructor called" << CLR_RESET << std::endl;
|
||||
std::cerr << CLR_MAGENTA << "Debug: Thanks to use the constructor with port and password !" << std::endl;
|
||||
std::cout << CLR_GREY << "Info: Server default constructor called" << CLR_RESET << std::endl;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue