maybe fix bug: download bitstream failed
This commit is contained in:
@@ -116,6 +116,7 @@ public class UDPServer
|
||||
/// </summary>
|
||||
/// <param name="ipAddr"> 目标IP地址 </param>
|
||||
/// <param name="timeout">超时时间</param>
|
||||
/// <param name="cycle">延迟时间</param>
|
||||
/// <param name="callerName">调用函数名称</param>
|
||||
/// <param name="callerLineNum">调用函数位置</param>
|
||||
/// <returns>
|
||||
@@ -124,7 +125,7 @@ public class UDPServer
|
||||
/// Optional 存在时,为最先收到的数据
|
||||
/// </returns>
|
||||
public async ValueTask<Optional<UDPData>> FindDataAsync(
|
||||
string ipAddr, int timeout = 1000,
|
||||
string ipAddr, int timeout = 1000, int cycle = 0,
|
||||
[CallerMemberName] string callerName = "",
|
||||
[CallerLineNumber] int callerLineNum = 0)
|
||||
{
|
||||
@@ -153,6 +154,8 @@ public class UDPServer
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await Task.Delay(cycle);
|
||||
}
|
||||
|
||||
if (data is null)
|
||||
@@ -171,8 +174,9 @@ public class UDPServer
|
||||
/// </summary>
|
||||
/// <param name="ipAddr">IP地址</param>
|
||||
/// <param name="timeout">超时时间</param>
|
||||
/// <param name="cycle">延迟时间</param>
|
||||
/// <returns>数据列表</returns>
|
||||
public async ValueTask<Optional<List<UDPData>>> GetDataArrayAsync(string ipAddr, int timeout = 1000)
|
||||
public async ValueTask<Optional<List<UDPData>>> GetDataArrayAsync(string ipAddr, int timeout = 1000, int cycle = 0)
|
||||
{
|
||||
List<UDPData>? data = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user