mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
feat: add DeleteAllUiClientsHandler and route for deleting all clients. Resolve issues with client closing websocket connection to DebugWebsocketSink
This commit is contained in:
parent
a610e127de
commit
6e9480f503
3 changed files with 255 additions and 108 deletions
|
|
@ -238,11 +238,17 @@ namespace PepperDash.Essentials.WebSocketServer
|
|||
|
||||
var routes = new List<HttpCwsRoute>
|
||||
{
|
||||
new HttpCwsRoute($"devices/{Key}/client")
|
||||
new HttpCwsRoute($"device/{Key}/client")
|
||||
{
|
||||
Name = "ClientHandler",
|
||||
RouteHandler = new UiClientHandler(this)
|
||||
},
|
||||
|
||||
new HttpCwsRoute($"device/{Key}/deleteAllUiClients")
|
||||
{
|
||||
Name = "DeleteAllClientsHandler",
|
||||
RouteHandler = new DeleteAllUiClientsHandler(this)
|
||||
},
|
||||
};
|
||||
|
||||
apiServer.AddRoute(routes);
|
||||
|
|
@ -908,7 +914,7 @@ namespace PepperDash.Essentials.WebSocketServer
|
|||
/// <summary>
|
||||
/// Removes all clients from the server
|
||||
/// </summary>
|
||||
private void RemoveAllTokens(string s)
|
||||
public void RemoveAllTokens(string s)
|
||||
{
|
||||
if (s == "?" || string.IsNullOrEmpty(s))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue