Exemple #1
0
        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();
        }
Exemple #2
0
        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();
        }