merge conflicts resolution with develop->master.
This commit is contained in:
commit
1d16d0c17f
2
EPoll.h
2
EPoll.h
@ -32,7 +32,7 @@ namespace core {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
volatile long long eventId = 0;
|
long long eventId = 0;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// The constructor for the BMAEPoll object.
|
/// The constructor for the BMAEPoll object.
|
||||||
|
@ -7,21 +7,18 @@
|
|||||||
namespace core
|
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_t uuid;
|
||||||
uuid_generate(uuid);
|
uuid_generate(uuid);
|
||||||
alias = coreutils::MString((char *)uuid, 26);
|
alias = coreutils::MString((char *)uuid, 26);
|
||||||
}
|
}
|
||||||
|
|
||||||
TCPSession::~TCPSession()
|
TCPSession::~TCPSession() {
|
||||||
{
|
|
||||||
server.removeFromSessionList(this);
|
server.removeFromSessionList(this);
|
||||||
server.subscriptions.removeSessionSubscriptions(*this);
|
server.subscriptions.removeSessionSubscriptions(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCPSession::output(std::stringstream &data)
|
void TCPSession::output(std::stringstream &data) {
|
||||||
{
|
|
||||||
data << "|" << ipAddress.getClientAddressAndPort();
|
data << "|" << ipAddress.getClientAddressAndPort();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,35 +74,30 @@ namespace core
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCPSession::setBlockSize(int blockSize)
|
void TCPSession::setBlockSize(int blockSize) {
|
||||||
{
|
|
||||||
this->blockSize = blockSize;
|
this->blockSize = blockSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCPSession::onLineReceived(coreutils::ZString &line)
|
void TCPSession::onLineReceived(coreutils::ZString &line) {
|
||||||
{
|
|
||||||
protocol(line);
|
protocol(line);
|
||||||
send();
|
send();
|
||||||
if (term)
|
if (term)
|
||||||
shutdown("termination requested");
|
shutdown("termination requested");
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCPSession::onBlockReceived(coreutils::ZString &block)
|
void TCPSession::onBlockReceived(coreutils::ZString &block) {
|
||||||
{
|
|
||||||
coreutils::Log(coreutils::LOG_DEBUG_3) << "[" << block.getLength() << "]";
|
coreutils::Log(coreutils::LOG_DEBUG_3) << "[" << block.getLength() << "]";
|
||||||
if (term)
|
if (term)
|
||||||
shutdown("termination requested");
|
shutdown("termination requested");
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCPSession::send()
|
void TCPSession::send() {
|
||||||
{
|
|
||||||
if (out.tellp() > 0)
|
if (out.tellp() > 0)
|
||||||
write(out.str());
|
write(out.str());
|
||||||
out.str("");
|
out.str("");
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCPSession::terminate()
|
void TCPSession::terminate() {
|
||||||
{
|
|
||||||
term = true;
|
term = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
compile
2
compile
@ -5,7 +5,7 @@ do
|
|||||||
filename="${file%.*}"
|
filename="${file%.*}"
|
||||||
list="$list $filename.o"
|
list="$list $filename.o"
|
||||||
echo -n "Compiling $filename..."
|
echo -n "Compiling $filename..."
|
||||||
g++ -g -c -std=c++17 -I../CoreUtils $file &
|
g++ -g -c -std=c++23 -I../CoreUtils $file &
|
||||||
if [ $? = '0' ]
|
if [ $? = '0' ]
|
||||||
then
|
then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user