mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
System - server reconnecting !
This commit is contained in:
@@ -434,12 +434,13 @@ namespace PepperDash.Essentials
|
|||||||
if (WSClient == null)
|
if (WSClient == null)
|
||||||
{
|
{
|
||||||
WSClient = new WebSocketClient();
|
WSClient = new WebSocketClient();
|
||||||
|
}
|
||||||
WSClient.URL = string.Format("wss://{0}/system/join/{1}", Config.ServerUrl, this.SystemUuid);
|
WSClient.URL = string.Format("wss://{0}/system/join/{1}", Config.ServerUrl, this.SystemUuid);
|
||||||
WSClient.Connect();
|
WSClient.Connect();
|
||||||
Debug.Console(0, this, "Websocket connected");
|
Debug.Console(0, this, "Websocket connected");
|
||||||
WSClient.ReceiveCallBack = WebsocketReceive;
|
WSClient.ReceiveCallBack = WebsocketReceive;
|
||||||
WSClient.ReceiveAsync();
|
WSClient.ReceiveAsync();
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//// **********************************
|
//// **********************************
|
||||||
@@ -497,6 +498,7 @@ namespace PepperDash.Essentials
|
|||||||
WebSocketClient.WEBSOCKET_RESULT_CODES err)
|
WebSocketClient.WEBSOCKET_RESULT_CODES err)
|
||||||
{
|
{
|
||||||
var rx = System.Text.Encoding.UTF8.GetString(data, 0, (int)length);
|
var rx = System.Text.Encoding.UTF8.GetString(data, 0, (int)length);
|
||||||
|
if(rx.Length > 0)
|
||||||
ParseStreamRx(rx);
|
ParseStreamRx(rx);
|
||||||
WSClient.ReceiveAsync();
|
WSClient.ReceiveAsync();
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user