NetworkBaseReceiveCommandLineFromSocketAsync 方法 (Socket, Byte, Int32) |
接收一行命令数据,需要自己指定这个结束符,默认超时时间为60秒,也即是60000,单位是毫秒
To receive a line of command data, you need to specify the terminator yourself. The default timeout is 60 seconds, which is 60,000, in milliseconds.
命名空间:
HslCommunication.Core.Net
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 protected Task<OperateResult<byte[]>> ReceiveCommandLineFromSocketAsync(
Socket socket,
byte endCode,
int timeout = 2147483647
)
Protected Function ReceiveCommandLineFromSocketAsync (
socket As Socket,
endCode As Byte,
Optional timeout As Integer = 2147483647
) As Task(Of OperateResult(Of Byte()))
protected:
Task<OperateResult<array<unsigned char>^>^>^ ReceiveCommandLineFromSocketAsync(
Socket^ socket,
unsigned char endCode,
int timeout = 2147483647
)
member ReceiveCommandLineFromSocketAsync :
socket : Socket *
endCode : byte *
?timeout : int
(* Defaults:
let _timeout = defaultArg timeout 2147483647
*)
-> Task<OperateResult<byte[]>>
参数
- socket
- 类型:System.Net.SocketsSocket
网络套接字 - endCode
- 类型:SystemByte
结束符信息 - timeout (Optional)
- 类型:SystemInt32
超时时间,默认为60000,单位为毫秒,也就是60秒
返回值
类型:
TaskOperateResultByte带有结果对象的数据信息
参见