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;
|
||||
}
|
||||
|
||||
bool PacketDecoder::verify_encryption_client_packet(const pipes::buffer_view &buffer) {
|
||||
ClientPacketParser packet_parser{buffer};
|
||||
if(!packet_parser.valid() || !packet_parser.is_encrypted()) {
|
||||
bool PacketDecoder::verify_encryption_client_packet(const protocol::ClientPacketParser& packet_parser) {
|
||||
if(!packet_parser.is_encrypted()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
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() {
|
||||
|
@ -62,7 +62,7 @@ namespace ts::protocol {
|
||||
|
||||
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 */
|
||||
PacketProcessResult process_incoming_data(protocol::PacketParser &/* packet */, std::string& /* error detail */);
|
||||
|
Loading…
Reference in New Issue
Block a user