Find cams timeout extended
This commit is contained in:
@@ -89,6 +89,7 @@ namespace AiQ_GUI
|
||||
{
|
||||
const int sendPort = 6666;
|
||||
const int receivePort = 6667;
|
||||
const int discoveryTimeoutMs = 1000;
|
||||
IList<string> FoundCams = [];
|
||||
|
||||
byte[] discoveryPacket = [0x50, 0x4f, 0x4c, 0x4c, 0xaf, 0xb0, 0xb3, 0xb3, 0xb6, 0x01, 0xa8, 0xc0, 0x0b, 0x1a, 0x00, 0x00];
|
||||
@@ -103,9 +104,9 @@ namespace AiQ_GUI
|
||||
}
|
||||
|
||||
using UdpClient receiver = new(receivePort); // Listen for replies on fixed port
|
||||
receiver.Client.ReceiveTimeout = 750;
|
||||
receiver.Client.ReceiveTimeout = discoveryTimeoutMs;
|
||||
|
||||
DateTime timeout = DateTime.Now.AddMilliseconds(750);
|
||||
DateTime timeout = DateTime.Now.AddMilliseconds(discoveryTimeoutMs);
|
||||
try
|
||||
{
|
||||
while (DateTime.Now < timeout)
|
||||
|
||||
Reference in New Issue
Block a user