This commit is contained in:
hehaibing-1996
2024-05-15 18:59:24 +08:00
parent cc65e985aa
commit 432a96198f
75 changed files with 2174 additions and 272 deletions

View File

@ -16,9 +16,10 @@ namespace 货架标准上位机
{
public static class WebSocket
{
public static WebSocketClient client = null;
public static void InitWebSocket()
{
var client = new WebSocketClient();
client = new WebSocketClient();
client.Setup(new TouchSocketConfig()
.SetRemoteIPHost("ws://127.0.0.1:7789/ws")
.ConfigureContainer(a =>
@ -34,10 +35,8 @@ namespace 货架标准上位机
//配置断线重连
a.UseReconnection(-1, true, 1000);//-1表示一直重连
}));
client.Connect();
}
}
public class WebSocketClientPlugin : PluginBase, IWebSocketReceivedPlugin
{