MessagesClient Class

Definition

Subclient of IotHubServiceClient for sending cloud-to-device and cloud-to-module messages.

public class MessagesClient : IDisposable
type MessagesClient = class
    interface IDisposable
Public Class MessagesClient
Implements IDisposable
Inheritance
MessagesClient
Implements

Constructors

MessagesClient()

Creates an instance of this class. Provided for unit testing purposes only.

Properties

ErrorProcessor

The callback to be executed when the connection is lost.

Methods

CloseAsync(CancellationToken)

Close the connection.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

OpenAsync(CancellationToken)

Open the connection. Must be done before any cloud-to-device messages can be sent.

PurgeMessageQueueAsync(String, CancellationToken)

Removes all cloud-to-device messages from a device's queue.

SendAsync(String, Message, CancellationToken)

Send a cloud-to-device message to the specified device.

SendAsync(String, String, Message, CancellationToken)

Send a cloud-to-device message to the specified module.

Applies to