diff --git a/EPoll.h b/EPoll.h index d1440e3..58fc19b 100644 --- a/EPoll.h +++ b/EPoll.h @@ -32,7 +32,7 @@ namespace core { public: - volatile long long eventId = 0; + long long eventId = 0; /// /// The constructor for the BMAEPoll object. diff --git a/TCPSession.cpp b/TCPSession.cpp index 3e09c56..56f8c8c 100644 --- a/TCPSession.cpp +++ b/TCPSession.cpp @@ -7,21 +7,18 @@ namespace core { - TCPSession::TCPSession(EPoll &ePoll, TCPServer &server, std::string text) : TCPSocket(ePoll, text), server(server) - { + TCPSession::TCPSession(EPoll &ePoll, TCPServer &server, std::string text) : TCPSocket(ePoll, text), server(server) { uuid_t uuid; uuid_generate(uuid); alias = coreutils::MString((char *)uuid, 26); } - TCPSession::~TCPSession() - { + TCPSession::~TCPSession() { server.removeFromSessionList(this); server.subscriptions.removeSessionSubscriptions(*this); } - void TCPSession::output(std::stringstream &data) - { + void TCPSession::output(std::stringstream &data) { data << "|" << ipAddress.getClientAddressAndPort(); } @@ -77,35 +74,30 @@ namespace core } } - void TCPSession::setBlockSize(int blockSize) - { + void TCPSession::setBlockSize(int blockSize) { this->blockSize = blockSize; } - void TCPSession::onLineReceived(coreutils::ZString &line) - { + void TCPSession::onLineReceived(coreutils::ZString &line) { protocol(line); send(); if (term) shutdown("termination requested"); } - void TCPSession::onBlockReceived(coreutils::ZString &block) - { + void TCPSession::onBlockReceived(coreutils::ZString &block) { coreutils::Log(coreutils::LOG_DEBUG_3) << "[" << block.getLength() << "]"; if (term) shutdown("termination requested"); } - void TCPSession::send() - { + void TCPSession::send() { if (out.tellp() > 0) write(out.str()); out.str(""); } - void TCPSession::terminate() - { + void TCPSession::terminate() { term = true; } diff --git a/compile b/compile index 65f0717..f5ad39c 100755 --- a/compile +++ b/compile @@ -5,7 +5,7 @@ do filename="${file%.*}" list="$list $filename.o" echo -n "Compiling $filename..." - g++ -g -c -std=c++17 -I../CoreUtils $file & + g++ -g -c -std=c++23 -I../CoreUtils $file & if [ $? = '0' ] then echo "OK"