Continued restructing.

This commit is contained in:
barant committed 2019-09-13 09:16:55 -07:00
1 parent 5e5e626d28
commit a46db126e9
294 files changed
+2455 -2189

No files matched your search

+6 -15
View File
@@ -5,24 +5,15 @@
namespace core {
ConsoleServer::ConsoleServer(EPoll &ePoll, Service service, IPAddress address)
ConsoleServer::ConsoleServer(EPoll &ePoll, Service &service, IPAddress address)
: TCPServerSocket(ePoll, service, address) {
Log(this);
coreutils::Log(this);
}
ConsoleServer::~ConsoleServer() {}
void ConsoleServer::sendToConnectedConsoles(std::string out) {
void ConsoleServer::logSend(std::string out) {
for(auto *session : service.sessions)
((ConsoleSession *)session)->writeLog(out);
}
Session * ConsoleServer::getSocketAccept() {
return new ConsoleSession(ePoll, this->service);
}
void ConsoleServer::output(Session *session) {
session->out << "|" << session->ipAddress.getClientAddressAndPort();
((ConsoleSession *)session)->writeLog(out);
}
}