Skip to content
Snippets Groups Projects
Commit 8385e885 authored by akiraohgaki's avatar akiraohgaki
Browse files

Set websocket url info

parent f36183cd
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,10 @@ WebSocketServer::~WebSocketServer()
bool WebSocketServer::start()
{
if (wsServer_->listen(QHostAddress::Any, serverPort_)) {
auto application = configHandler_->getUsrConfigApplication();
application["websocket_url"] = serverUrl().toString();
configHandler_->setUsrConfigApplication(application);
emit started();
return true;
}
......@@ -63,6 +67,10 @@ bool WebSocketServer::start()
void WebSocketServer::stop()
{
auto application = configHandler_->getUsrConfigApplication();
application["websocket_url"] = QString("");
configHandler_->setUsrConfigApplication(application);
wsServer_->close();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment