Added some debug info

This commit is contained in:
WolverinDEV 2020-04-02 19:18:58 +02:00
parent 1865a3b20d
commit b594c9566c
3 changed files with 4 additions and 3 deletions

View File

@ -641,9 +641,10 @@ bool ConnectedClient::handle_text_command(
auto id = vc->getConnection()->getPacketIdManager().currentPacketId(type); auto id = vc->getConnection()->getPacketIdManager().currentPacketId(type);
auto gen = vc->getConnection()->getPacketIdManager().generationId(type); auto gen = vc->getConnection()->getPacketIdManager().generationId(type);
auto genestis = vc->getConnection()->get_incoming_generation_estimators();
send_message(_this.lock(), " OUT " + type.name() + " => generation: " + to_string(gen) + " id: " + to_string(id)); send_message(_this.lock(), " OUT " + type.name() + " => generation: " + to_string(gen) + " id: " + to_string(id));
//auto& buffer = vc->getConnection()->packet_buffers()[type.type()]; send_message(_this.lock(), " IN " + type.name() + " => generation: " + to_string(genestis[type.type()].generation()) + " id: " + to_string(genestis[type.type()].current_packet_id()));
//send_message(_this.lock(), " IN " + type.name() + " => generation: " + to_string(buffer.generation(0)) + " id: " + to_string(buffer.current_index()));
} }
return true; return true;
} else if(TARG(0, "disconnect")) { } else if(TARG(0, "disconnect")) {

View File

@ -65,7 +65,6 @@ void SpeakingClient::handlePacketVoice(const pipes::buffer_view& data, bool head
if(!speaking_client) return true; if(!speaking_client) return true;
return !speaking_client->shouldReceiveVoice(self); return !speaking_client->shouldReceiveVoice(self);
}), target_clients.end()); }), target_clients.end());
if(target_clients.empty()) { if(target_clients.empty()) {
return; return;

View File

@ -82,6 +82,7 @@ namespace ts {
bool wait_empty_write_and_prepare_queue(std::chrono::time_point<std::chrono::system_clock> until = std::chrono::time_point<std::chrono::system_clock>()); bool wait_empty_write_and_prepare_queue(std::chrono::time_point<std::chrono::system_clock> until = std::chrono::time_point<std::chrono::system_clock>());
protocol::PacketIdManager& getPacketIdManager() { return this->packet_id_manager; } protocol::PacketIdManager& getPacketIdManager() { return this->packet_id_manager; }
inline auto get_incoming_generation_estimators() { return this->incoming_generation_estimators; }
void reset(); void reset();
void force_insert_command(const pipes::buffer_view& /* payload */); void force_insert_command(const pipes::buffer_view& /* payload */);