diff --git a/src/core/CNProtocol.cpp b/src/core/CNProtocol.cpp index b5e7483..cd7f808 100644 --- a/src/core/CNProtocol.cpp +++ b/src/core/CNProtocol.cpp @@ -462,7 +462,7 @@ void CNServer::start() { if (!setSockNonblocking(sock, newConnectionSocket)) continue; - std::cout << "New connection! " << inet_ntoa(address.sin_addr) << std::endl; + std::cout << "New " << serverType << " connection! " << inet_ntoa(address.sin_addr) << std::endl; addPollFD(newConnectionSocket); diff --git a/src/core/CNProtocol.hpp b/src/core/CNProtocol.hpp index ec50fa5..782190f 100644 --- a/src/core/CNProtocol.hpp +++ b/src/core/CNProtocol.hpp @@ -230,6 +230,7 @@ protected: const size_t STARTFDSCOUNT = 8; // number of initial PollFD slots std::vector fds; + std::string serverType = "invalid"; SOCKET sock; uint16_t port; socklen_t addressSize; diff --git a/src/servers/CNLoginServer.cpp b/src/servers/CNLoginServer.cpp index f1ba6b8..95135e9 100644 --- a/src/servers/CNLoginServer.cpp +++ b/src/servers/CNLoginServer.cpp @@ -11,6 +11,7 @@ std::map CNLoginServer::loginSessions; CNLoginServer::CNLoginServer(uint16_t p) { + serverType = "login"; port = p; pHandler = &CNLoginServer::handlePacket; init(); diff --git a/src/servers/CNShardServer.cpp b/src/servers/CNShardServer.cpp index 0c97c9f..c56657e 100644 --- a/src/servers/CNShardServer.cpp +++ b/src/servers/CNShardServer.cpp @@ -16,6 +16,7 @@ std::map CNShardServer::ShardPackets; std::list CNShardServer::Timers; CNShardServer::CNShardServer(uint16_t p) { + serverType = "shard"; port = p; pHandler = &CNShardServer::handlePacket; REGISTER_SHARD_TIMER(keepAliveTimer, 4000);