Esempio n. 1
0
        static void Main(string[] args)
        {
            ConnectMqtt     connect = new ConnectMqtt();
            PublishInfo     pubInfo = new PublishInfo();
            ConfigXMLReader runXml  = new ConfigXMLReader();

            signalHandler += HandleConsoleSignal;
            ConsoleHelper.SetSignalHandler(signalHandler, true);

            connect.MqttConnect(runXml.XMLReader());
            //pubInfo.PublishMessage(); class for sending message on Mqtt broker server for choosen topic

            Console.ReadKey();
        }
Esempio n. 2
0
        private static void HandleConsoleSignal(ConsoleSignal consoleSignal)
        {
            ConnectMqtt connect = new ConnectMqtt();

            connect.DisconnectMqtt();
        }