ServiceClient.SendAsync Method
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.
Overloads
SendAsync(String, Message, Nullable<TimeSpan>) |
Send a cloud-to-device message to the specified device. This call is made over AMQP. |
SendAsync(String, String, Message, Nullable<TimeSpan>) |
Send a cloud-to-device message to the specified module. |
SendAsync(String, Message, Nullable<TimeSpan>)
Send a cloud-to-device message to the specified device. This call is made over AMQP.
public virtual System.Threading.Tasks.Task SendAsync (string deviceId, Microsoft.Azure.Devices.Message message, TimeSpan? timeout = default);
abstract member SendAsync : string * Microsoft.Azure.Devices.Message * Nullable<TimeSpan> -> System.Threading.Tasks.Task
override this.SendAsync : string * Microsoft.Azure.Devices.Message * Nullable<TimeSpan> -> System.Threading.Tasks.Task
Public Overridable Function SendAsync (deviceId As String, message As Message, Optional timeout As Nullable(Of TimeSpan) = Nothing) As Task
Parameters
- deviceId
- String
The device identifier for the target device.
- message
- Message
The cloud-to-device message.
Returns
Applies to
SendAsync(String, String, Message, Nullable<TimeSpan>)
Send a cloud-to-device message to the specified module.
public virtual System.Threading.Tasks.Task SendAsync (string deviceId, string moduleId, Microsoft.Azure.Devices.Message message, TimeSpan? timeout = default);
abstract member SendAsync : string * string * Microsoft.Azure.Devices.Message * Nullable<TimeSpan> -> System.Threading.Tasks.Task
override this.SendAsync : string * string * Microsoft.Azure.Devices.Message * Nullable<TimeSpan> -> System.Threading.Tasks.Task
Public Overridable Function SendAsync (deviceId As String, moduleId As String, message As Message, Optional timeout As Nullable(Of TimeSpan) = Nothing) As Task
Parameters
- deviceId
- String
The device identifier for the target device.
- moduleId
- String
The module identifier for the target module.
- message
- Message
The cloud-to-module message.