Share via


ServiceClient.SendAsync Method

Definition

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.

timeout
Nullable<TimeSpan>

The operation timeout, which defaults to 1 minute if unspecified.

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.

timeout
Nullable<TimeSpan>

The operation timeout, which defaults to 1 minute if unspecified.

Returns

Applies to