你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

DirectMethodServiceRequest.ConnectionTimeout 属性

定义

为服务提供连接到设备的时间量。

[Newtonsoft.Json.JsonIgnore]
public TimeSpan? ConnectionTimeout { get; set; }
[<Newtonsoft.Json.JsonIgnore>]
member this.ConnectionTimeout : Nullable<TimeSpan> with get, set
Public Property ConnectionTimeout As Nullable(Of TimeSpan)

属性值

属性
Newtonsoft.Json.JsonIgnoreAttribute

注解

如果此值设置为零,并且目标设备未连接到云,则可能会发生超时。 如果该值大于零,则当云无法将请求传送到目标设备时,也可能发生此情况。

此值以秒为单位传播到服务,因此此值的精度级别不低于秒。 例如,使用 ConnectTimeout.TotalSeconds) (, 值TimeSpan.FromMilliseconds(500)将被解释为 0 秒。

适用于