fature
This commit is contained in:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user