mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 20:55:38 +08:00
Opus codec module test pass
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
#include "log.h"
|
||||
|
||||
WsTransmission::WsTransmission(
|
||||
std::function<void(const std::string &)> on_receive_msg_cb)
|
||||
: on_receive_msg_(on_receive_msg_cb) {}
|
||||
std::function<void(const std::string &)> on_receive_msg_cb,
|
||||
std::function<void(WsStatus)> on_ws_status_cb)
|
||||
: on_receive_msg_(on_receive_msg_cb), on_ws_status_(on_ws_status_cb) {}
|
||||
|
||||
WsTransmission::~WsTransmission() {}
|
||||
|
||||
@@ -13,4 +14,11 @@ void WsTransmission::OnReceiveMessage(const std::string &msg) {
|
||||
if (on_receive_msg_) {
|
||||
on_receive_msg_(msg);
|
||||
}
|
||||
}
|
||||
|
||||
void WsTransmission::OnWsStatus(WsStatus ws_status) {
|
||||
// LOG_INFO("Receive msg: {}", msg);
|
||||
if (on_ws_status_) {
|
||||
on_ws_status_(ws_status);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user