Skip to content

Commit

Permalink
Switch back to MQTT as default transport (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
LazarusX authored Dec 13, 2018
1 parent 3b5f154 commit d365a3b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace SampleModule
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Devices.Client;
using Microsoft.Azure.Devices.Client.Transport.Mqtt;

class Program
{
Expand Down Expand Up @@ -41,8 +42,8 @@ public static Task WhenCancelled(CancellationToken cancellationToken)
/// </summary>
static async Task Init()
{
AmqpTransportSettings amqpSetting = new AmqpTransportSettings(TransportType.Amqp_Tcp_Only);
ITransportSettings[] settings = { amqpSetting };
MqttTransportSettings mqttSetting = new MqttTransportSettings(TransportType.Mqtt_Tcp_Only);
ITransportSettings[] settings = { mqttSetting };

// Open a connection to the Edge runtime
ModuleClient ioTHubModuleClient = await ModuleClient.CreateFromEnvironmentAsync(settings);
Expand Down

0 comments on commit d365a3b

Please sign in to comment.