mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
System - server reconnecting !
This commit is contained in:
parent
359bd508e5
commit
cdbab152f6
3 changed files with 8 additions and 6 deletions
|
|
@ -434,12 +434,13 @@ namespace PepperDash.Essentials
|
|||
if (WSClient == null)
|
||||
{
|
||||
WSClient = new WebSocketClient();
|
||||
}
|
||||
WSClient.URL = string.Format("wss://{0}/system/join/{1}", Config.ServerUrl, this.SystemUuid);
|
||||
WSClient.Connect();
|
||||
Debug.Console(0, this, "Websocket connected");
|
||||
WSClient.ReceiveCallBack = WebsocketReceive;
|
||||
WSClient.ReceiveAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//// **********************************
|
||||
|
|
@ -497,6 +498,7 @@ namespace PepperDash.Essentials
|
|||
WebSocketClient.WEBSOCKET_RESULT_CODES err)
|
||||
{
|
||||
var rx = System.Text.Encoding.UTF8.GetString(data, 0, (int)length);
|
||||
if(rx.Length > 0)
|
||||
ParseStreamRx(rx);
|
||||
WSClient.ReceiveAsync();
|
||||
return 1;
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue