点击或拖拽改变大小

NetworkBaseSendStreamToSocket 方法

发送一个流的所有数据到指定的网络套接字,需要指定发送的数据长度,支持按照百分比的进度报告
Send all the data of a stream to the specified network socket. You need to specify the length of the data to be sent. It supports the progress report in percentage.

命名空间:  HslCommunication.Core.Net
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
protected OperateResult SendStreamToSocket(
	Socket socket,
	Stream stream,
	long receive,
	Action<long, long> report,
	bool reportByPercent
)

参数

socket
类型:System.Net.SocketsSocket
套接字
stream
类型:System.IOStream
内存流
receive
类型:SystemInt64
发送的数据长度
report
类型:SystemActionInt64, Int64
进度报告的委托
reportByPercent
类型:SystemBoolean
进度报告是否按照百分比报告

返回值

类型:OperateResult
是否成功的结果对象
参见