This class represents the websocket server for nymead. More...
Header: | #include <WebSocketServer> |
Inherits: | nymeaserver::TransportInterface |
void | setServerName(const int &serverName) override |
virtual bool | startServer() override |
virtual bool | stopServer() override |
This class represents the websocket server for nymead.
Note: The WebSocketServer is only available for builds with Qt version greater than Qt 5.3.0!
The websocket server provides a server for websocket clients based on Protocol Version 13. The default port for the websocket server is 4444, which is according to this list officially free.
The URL for the insecure websocket:
The URL for the secure websocket (TLS 1.2): \code wss://localhost:4444
You can turn on the wss
server in the WebServerServer
section of the /etc/nymea/nymead.conf
file.
Note: For wss
you need to have a certificate and configure it in the SSL-configuration
section of the /etc/nymea/nymead.conf
file.
See also WebServer, TcpServer, and TransportInterface.
Sets the server name to the given serverName.
[override virtual]
bool WebSocketServer::startServer()Reimplemented from TransportInterface::startServer().
Returns true if this WebSocketServer started successfully.
See also TransportInterface::startServer().
[override virtual]
bool WebSocketServer::stopServer()Reimplemented from TransportInterface::stopServer().
Returns true if this WebSocketServer stopped successfully.
See also TransportInterface::stopServer().