Using one global event loop for the query and web client
This commit is contained in:
parent
2747c67f44
commit
0726cd6c95
@ -197,14 +197,13 @@ PacketProcessResult PacketDecoder::decrypt_incoming_packet(std::string& error, P
|
|||||||
return PacketProcessResult::SUCCESS;
|
return PacketProcessResult::SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PacketDecoder::verify_encryption_client_packet(const pipes::buffer_view &buffer) {
|
bool PacketDecoder::verify_encryption_client_packet(const protocol::ClientPacketParser& packet_parser) {
|
||||||
ClientPacketParser packet_parser{buffer};
|
if(!packet_parser.is_encrypted()) {
|
||||||
if(!packet_parser.valid() || !packet_parser.is_encrypted()) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(packet_parser.type() >= 0 && packet_parser.type() < this->incoming_generation_estimators.size());
|
assert(packet_parser.type() >= 0 && packet_parser.type() < this->incoming_generation_estimators.size());
|
||||||
return this->crypt_handler_->verify_encryption(buffer, packet_parser.packet_id(), this->incoming_generation_estimators[packet_parser.type()].generation());
|
return this->crypt_handler_->verify_encryption(packet_parser.buffer(), packet_parser.packet_id(), this->incoming_generation_estimators[packet_parser.type()].generation());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PacketDecoder::register_initiv_packet() {
|
void PacketDecoder::register_initiv_packet() {
|
||||||
|
@ -62,7 +62,7 @@ namespace ts::protocol {
|
|||||||
|
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
bool verify_encryption_client_packet(const pipes::buffer_view& /* full packet */);
|
bool verify_encryption_client_packet(const protocol::ClientPacketParser& /* packet */);
|
||||||
|
|
||||||
/* true if commands might be pending */
|
/* true if commands might be pending */
|
||||||
PacketProcessResult process_incoming_data(protocol::PacketParser &/* packet */, std::string& /* error detail */);
|
PacketProcessResult process_incoming_data(protocol::PacketParser &/* packet */, std::string& /* error detail */);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user