NetworkBaseReceiveCommandLineFromSocket 方法 (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 OperateResult<byte[]> ReceiveCommandLineFromSocket(
Socket socket,
byte endCode,
int timeout = 60000
)
Protected Function ReceiveCommandLineFromSocket (
socket As Socket,
endCode As Byte,
Optional timeout As Integer = 60000
) As OperateResult(Of Byte())
protected:
OperateResult<array<unsigned char>^>^ ReceiveCommandLineFromSocket(
Socket^ socket,
unsigned char endCode,
int timeout = 60000
)
member ReceiveCommandLineFromSocket :
socket : Socket *
endCode : byte *
?timeout : int
(* Defaults:
let _timeout = defaultArg timeout 60000
*)
-> OperateResult<byte[]>
参数
- socket
- 类型:System.Net.SocketsSocket
网络套接字 - endCode
- 类型:SystemByte
结束符信息 - timeout (Optional)
- 类型:SystemInt32
超时时间,默认为60000,单位为毫秒,也就是60秒
返回值
类型:
OperateResultByte带有结果对象的数据信息
参见