点击或拖拽改变大小

NetworkBaseReceiveByMessage 方法

接收一条完整的 数据内容,需要指定超时时间,单位为毫秒。
Receive a complete data content, Need to specify a timeout period in milliseconds

命名空间:  HslCommunication.Core.Net
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
protected virtual OperateResult<byte[]> ReceiveByMessage(
	Socket socket,
	int timeOut,
	INetMessage netMessage,
	Action<long, long> reportProgress = null
)

参数

socket
类型:System.Net.SocketsSocket
网络的套接字
timeOut
类型:SystemInt32
超时时间,单位:毫秒
netMessage
类型:HslCommunication.Core.IMessageINetMessage
消息的格式定义
reportProgress (Optional)
类型:SystemActionInt64, Int64
接收消息的时候的进度报告

返回值

类型:OperateResultByte
带有是否成功的byte数组对象
参见