点击或拖拽改变大小

CommunicationPipeReceive 方法 (Int32, Int32, ActionInt64, Int64)

从管道里,接收指定长度的报文数据信息,如果长度指定为-1,表示接收不超过2048字节的动态长度。另外可以指定超时时间,进度报告等
Receives the packet data of a specified length from the pipe. If the length is set to -1, it indicates that the dynamic length of the packet is not more than 2048 bytes. You can also specify timeouts, progress reports, etc

命名空间:  HslCommunication.Core.Pipe
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.1.0.0 (12.1.0.0)
语法
public virtual OperateResult<byte[]> Receive(
	int length,
	int timeOut,
	Action<long, long> reportProgress = null
)

参数

length
类型:SystemInt32
接收的长度信息
timeOut
类型:SystemInt32
指定的超时时间
reportProgress (Optional)
类型:SystemActionInt64, Int64
进行进度报告的委托

返回值

类型:OperateResultByte
是否接收成功的结果对象
参见