Allowing the webclient to whisper

This commit is contained in:
WolverinDEV
2020-11-28 11:27:31 +01:00
parent 5ed16d3756
commit 5cf3b0b75c
8 changed files with 26 additions and 50 deletions
@@ -153,6 +153,15 @@ bool WhisperHandler::process_packet(const protocol::ClientPacketParser &packet,
return this->session_state == SessionState::Initialized;
}
void WhisperHandler::signal_session_reset() {
auto server = this->handle->getServer();
if(!server) {
return;
}
server->rtc_server().reset_whisper_session(this->handle->rtc_client_id);
}
void WhisperHandler::handle_session_reset() {
this->session_state = SessionState::Uninitialized;
if(this->whisper_head_ptr) {
@@ -47,6 +47,7 @@ namespace ts::server::whisper {
ts::command_result initialize_session_new(uint32_t /* stream id */, uint8_t /* type */, uint8_t /* target */, uint64_t /* type id */);
ts::command_result initialize_session_old(uint32_t /* stream id */, const uint16_t* /* client ids */, size_t /* client count */, const uint64_t* /* channel ids */, size_t /* channel count */);
void signal_session_reset();
void handle_session_reset();
private: