一款简单易用的基础网络通讯组件库。

SingleStreamDataAdapterTesterRunAsync(ReadOnlyMemoryByte, Int32, Int32, Int32, Int32) 方法

以指定的超时时间异步运行数据适配器测试。

Definition

命名空间: TouchSocket.Core
程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
C#
public Task<TimeSpan> RunAsync(
	ReadOnlyMemory<byte> memory,
	int testCount,
	int expectedCount,
	int bufferLength,
	int millisecondsTimeout
)

参数

memory  ReadOnlyMemoryByte
要发送的数据内存块。
testCount  Int32
测试发送次数。
expectedCount  Int32
预期接收次数。
bufferLength  Int32
每次写入的缓冲区长度。
millisecondsTimeout  Int32
超时时间(毫秒)。

返回值

TaskTimeSpan
返回测试所用的时间。

异常

TimeoutException超时抛出异常。

参见