我的Xsocket客户端:
Connect(Object module)
{
var socket = new XSocketClient("wss://localhost:46000/SocketController", "https://somesites.com", CertUtils.RetrieveX509Certificate2());
socket.Open();
var list = new List<Task>();
list.Add(Task.Factory.StartNew(() => socket.Send(new { Module = module, Action = "GetStatus" }, "Exec")));
list.Add(Task.Factory.StartNew(() => socket.Send(new { Module = module, Action = "GetStatus" }, "Exec")));
list.Add(Task.Factory.StartNew(() => socket.Send(dataupdate, "Update")));
Task.WaitAll(list.ToArray());
}
致电1: 连接(....)/ 成功 /
致电2: 连接(....)/ 系统执行:未连接到服务器时无法发送消息 /
致电3: 连接(....)/ 系统执行:未连接到服务器时无法发送消息 /