MessagesClient Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應