mirror of
https://github.com/Ylianst/MeshCentralRouter
synced 2025-12-14 23:33:35 +00:00
Added ping/pong support.
This commit is contained in:
@@ -213,6 +213,17 @@ namespace MeshCentralRouter
|
||||
string action = jsonAction["action"].ToString();
|
||||
switch (action)
|
||||
{
|
||||
case "pong":
|
||||
{
|
||||
// NOP
|
||||
break;
|
||||
}
|
||||
case "ping":
|
||||
{
|
||||
// Send pong back
|
||||
if (wc != null) { wc.WriteStringWebSocket("{\"action\":\"pong\"}"); }
|
||||
break;
|
||||
}
|
||||
case "close":
|
||||
{
|
||||
disconnectCause = jsonAction["cause"].ToString();
|
||||
|
||||
Reference in New Issue
Block a user