mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 20:55:38 +08:00
Refactor connection create process
This commit is contained in:
16
src/ws/ws_transmission.cpp
Normal file
16
src/ws/ws_transmission.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "ws_transmission.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
WsTransmission::WsTransmission(
|
||||
std::function<void(const std::string &)> on_receive_msg_cb)
|
||||
: on_receive_msg_(on_receive_msg_cb) {}
|
||||
|
||||
WsTransmission::~WsTransmission() {}
|
||||
|
||||
void WsTransmission::OnReceiveMessage(const std::string &msg) {
|
||||
LOG_INFO("Receive msg: {}", msg);
|
||||
if (on_receive_msg_) {
|
||||
on_receive_msg_(msg);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user