点击或拖拽改变大小

NetworkDoubleBaseReceiveTimeOut 属性

获取或设置接收服务器反馈的时间,如果为负数,则不接收反馈
Gets or sets the time to receive server feedback, and if it is a negative number, does not receive feedback

命名空间:  HslCommunication.Core.Net
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public int ReceiveTimeOut { get; set; }

属性值

类型:Int32
备注
超时的通常原因是服务器端没有配置好,导致访问失败,为了不卡死软件,所以有了这个超时的属性。
示例
设置1秒的接收超时的示例
ReceiveTimeOut示例
// 设置反馈的超时时间,单位 毫秒
client.ReceiveTimeOut = 1000;
// 1秒没有接收到就自动返回失败,此处的地址示例是modbus的地址,对于读取也是一样的
OperateResult write = client.Write( "100", 123 );
参见