NetSupport 类 |
命名空间: HslCommunication.Core
NetSupport 类型公开以下成员。
名称 | 说明 | |
---|---|---|
SocketErrorCode |
表示Socket发生异常的错误码 An error code indicates that an exception has occurred in the socket |
名称 | 说明 | |
---|---|---|
CloseSocket |
关闭指定的socket套接字对象
| |
CreateReceiveBuffer |
创建接收数据的缓存,并返回是否创建成功 Create a cache that receives data and return whether the creation is successful | |
ReadFromCoreServer |
将多个数据报文按顺序发到设备,并从设备接收返回的数据内容,然后拼接成一个Byte[]信息,需要重写UnpackResponseContent(Byte, Byte)方法才能返回正确的结果。 Send multiple data packets to the device in sequence, and receive the returned data content from the device, and then splicing them into a Byte[] message, you need to rewrite UnpackResponseContent(Byte, Byte) method to return the correct result. | |
ReadFromCoreServerAsync |
将多个数据报文按顺序发到设备,并从设备接收返回的数据内容,然后拼接成一个Byte[]信息,需要重写UnpackResponseContent(Byte, Byte)方法才能返回正确的结果。 Send multiple data packets to the device in sequence, and receive the returned data content from the device, and then splicing them into a Byte[] message, you need to rewrite UnpackResponseContent(Byte, Byte) method to return the correct result. | |
ReadStream |
读取流中的数据到缓存区,读取的长度需要按照实际的情况来判断 Read the data in the stream to the buffer area. The length of the read needs to be determined according to the actual situation. | |
ReadStreamAsync |
读取流中的数据到缓存区,读取的长度需要按照实际的情况来判断 Read the data in the stream to the buffer area. The length of the read needs to be determined according to the actual situation. | |
SocketReceive(SslStream, Int32, Int32, ActionInt64, Int64) |
接收固定长度的字节数组,允许指定超时时间,默认为60秒,当length大于0时,接收固定长度的数据内容,当length小于0时,buffer长度的缓存数据 Receiving a fixed-length byte array, allowing a specified timeout time. The default is 60 seconds. When length is greater than 0, fixed-length data content is received. When length is less than 0, random data information of a length not greater than 2048 is received. | |
SocketReceive(Socket, Int32, Int32, ActionInt64, Int64) |
接收固定长度的字节数组,允许指定超时时间,默认为60秒,当length大于0时,接收固定长度的数据内容,当length小于0时,buffer长度的缓存数据 Receiving a fixed-length byte array, allowing a specified timeout time. The default is 60 seconds. When length is greater than 0, fixed-length data content is received. When length is less than 0, random data information of a length not greater than 2048 is received. | |
SocketReceive(SslStream, Byte, Int32, Int32, Int32, ActionInt64, Int64) |
接收固定长度的字节数组,允许指定超时时间,默认为60秒,当length大于0时,接收固定长度的数据内容,当length小于0时,buffer长度的缓存数据 Receiving a fixed-length byte array, allowing a specified timeout time. The default is 60 seconds. When length is greater than 0, fixed-length data content is received. When length is less than 0, random data information of a length not greater than 2048 is received. | |
SocketReceive(Socket, Byte, Int32, Int32, Int32, ActionInt64, Int64) |
接收固定长度的字节数组,允许指定超时时间,默认为60秒,当length大于0时,接收固定长度的数据内容,当length小于0时,buffer长度的缓存数据 Receiving a fixed-length byte array, allowing a specified timeout time. The default is 60 seconds. When length is greater than 0, fixed-length data content is received. When length is less than 0, random data information of a length not greater than 2048 is received. | |
SocketReceiveAsync(SslStream, Int32, Int32, ActionInt64, Int64) |
接收固定长度的字节数组,允许指定超时时间,默认为60秒,当length大于0时,接收固定长度的数据内容,当length小于0时,buffer长度的缓存数据 Receiving a fixed-length byte array, allowing a specified timeout time. The default is 60 seconds. When length is greater than 0, fixed-length data content is received. When length is less than 0, random data information of a length not greater than 2048 is received. | |
SocketReceiveAsync(Socket, Int32, Int32, ActionInt64, Int64) |
接收固定长度的字节数组,允许指定超时时间,默认为60秒,当length大于0时,接收固定长度的数据内容,当length小于0时,buffer长度的缓存数据 Receiving a fixed-length byte array, allowing a specified timeout time. The default is 60 seconds. When length is greater than 0, fixed-length data content is received. When length is less than 0, random data information of a length not greater than 2048 is received. | |
SocketReceiveAsync(SslStream, Byte, Int32, Int32, Int32, ActionInt64, Int64) |
接收固定长度的字节数组,允许指定超时时间,默认为60秒,当length大于0时,接收固定长度的数据内容,当length小于0时,buffer长度的缓存数据 Receiving a fixed-length byte array, allowing a specified timeout time. The default is 60 seconds. When length is greater than 0, fixed-length data content is received. When length is less than 0, random data information of a length not greater than 2048 is received. | |
SocketReceiveAsync(Socket, Byte, Int32, Int32, Int32, ActionInt64, Int64) |
接收固定长度的字节数组,允许指定超时时间,默认为60秒,当length大于0时,接收固定长度的数据内容,当length小于0时,buffer长度的缓存数据 Receiving a fixed-length byte array, allowing a specified timeout time. The default is 60 seconds. When length is greater than 0, fixed-length data content is received. When length is less than 0, random data information of a length not greater than 2048 is received. | |
SocketSend(SslStream, Byte) |
发送消息给套接字,直到完成的时候返回,经过测试,本方法是线程安全的。 Send a message to the socket until it returns when completed. After testing, this method is thread-safe. | |
SocketSend(Socket, Byte) |
发送消息给套接字,直到完成的时候返回,经过测试,本方法是线程安全的。 Send a message to the socket until it returns when completed. After testing, this method is thread-safe. | |
SocketSend(SslStream, Byte, Int32, Int32) |
发送消息给套接字,直到完成的时候返回,经过测试,本方法是线程安全的。 Send a message to the socket until it returns when completed. After testing, this method is thread-safe. | |
SocketSend(Socket, Byte, Int32, Int32) |
发送消息给套接字,直到完成的时候返回,经过测试,本方法是线程安全的。 Send a message to the socket until it returns when completed. After testing, this method is thread-safe. | |
SocketSendAsync(SslStream, Byte) |
发送消息给套接字,直到完成的时候返回,经过测试,本方法是线程安全的。 Send a message to the socket until it returns when completed. After testing, this method is thread-safe. | |
SocketSendAsync(Socket, Byte) |
发送消息给套接字,直到完成的时候返回,经过测试,本方法是线程安全的。 Send a message to the socket until it returns when completed. After testing, this method is thread-safe. | |
SocketSendAsync(SslStream, Byte, Int32, Int32) |
发送消息给套接字,直到完成的时候返回,经过测试,本方法是线程安全的。 Send a message to the socket until it returns when completed. After testing, this method is thread-safe. | |
SocketSendAsync(Socket, Byte, Int32, Int32) |
发送消息给套接字,直到完成的时候返回,经过测试,本方法是线程安全的。 Send a message to the socket until it returns when completed. After testing, this method is thread-safe. | |
WriteStream |
将缓冲区的数据写入到流里面去 Write the buffer data to the stream | |
WriteStreamAsync |
将缓冲区的数据写入到流里面去 Write the buffer data to the stream |