コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: yuxi214/MQTTnet
        private void OnConnected(object sender, MqttClientConnectedEventArgs e)
        {
            _traceMessages.Enqueue(new MqttNetLogMessage("", DateTime.Now, -1,
                                                         "", MqttNetLogLevel.Info, "! CONNECTED EVENT FIRED", null));

            Task.Run(UpdateLogAsync);
        }
コード例 #2
0
        private async void MqttClient_Connected(object sender, MQTTnet.Client.MqttClientConnectedEventArgs e)
        {
            await mqttClient.SubscribeAsync(new TopicFilterBuilder().WithTopic(reciveTopic[0]).Build());

            //await mqttClient.SubscribeAsync(new TopicFilterBuilder().WithTopic(sendTopic).Build());
            msg = "Init Completed";
            Xamarin.Forms.Device.BeginInvokeOnMainThread(SetStatus);
        }
コード例 #3
0
 private void OnConnected(object sender, MqttClientConnectedEventArgs eventArgs)
 {
     Connected?.Invoke(this, eventArgs);
 }
コード例 #4
0
 private void Client_Connected(object sender, MQTTnet.Client.MqttClientConnectedEventArgs e)
 {
     w.Dispatcher.Invoke(v, "connected to aws successfully!");
 }
コード例 #5
0
 private void _mqttClient_Connected(object sender, MQTTnet.Client.MqttClientConnectedEventArgs e)
 {
     _logger.LogDebug($"_mqttClient_Connected");
 }