ithewei %!s(int64=3) %!d(string=hai) anos
pai
achega
73a27d2ad7
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      examples/qt/server/HttpServerPage.cpp

+ 2 - 2
examples/qt/server/HttpServerPage.cpp

@@ -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));