private static void Server_OnClientConnected(TcpClient tcpClient) { Console.WriteLine("IOTClient connected"); var iotClient = new IOTClient(tcpClient); iotClient.OnDisconnected += IotClient_OnDisconnected; iotClient.OnMessageReceived += IotClient_OnMessageReceived; hub.OnIotConnected(iotClient); iotClient.Start(); }
private static void Server_OnClientConnected(System.Net.Sockets.TcpClient tcpClient) { Console.WriteLine("IOTClient connected"); var iotClient = new IOTClient(tcpClient); iotClient.OnDisconnected += IotClient_OnDisconnected; iotClient.OnMessageReceived += IotClient_OnMessageReceived; clientList.Add(iotClient); iotClient.Start(); }