Skip to content

Commit

Permalink
fix onopen
Browse files Browse the repository at this point in the history
  • Loading branch information
ithewei committed Dec 4, 2022
1 parent 63510bc commit 73a27d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/qt/server/HttpServerPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ bool HttpServerPage::start(int port, const char* host)
};

ws = new hv::WebSocketService;
ws->onopen = [](const WebSocketChannelPtr& channel, const std::string& url) {
g_mainwnd->postMessage(QString("ws onopen: ") + QString::fromStdString(url));
ws->onopen = [](const WebSocketChannelPtr& channel, const HttpRequestPtr& req) {
g_mainwnd->postMessage(QString("ws onopen: ") + QString::fromStdString(req->Path()));
};
ws->onmessage = [](const WebSocketChannelPtr& channel, const std::string& msg) {
g_mainwnd->postMessage(QString("ws onmessage: ") + QString::fromStdString(msg));
Expand Down

0 comments on commit 73a27d2

Please sign in to comment.