Fixed an issue where Windows VCP data latency was bad at low traffic

pull/4/head
Paul Hollinsky 2018-09-18 16:51:22 -04:00
parent 8375a354af
commit 8343093708
1 changed files with 4 additions and 0 deletions

View File

@ -142,6 +142,10 @@ bool VCP::open(bool fromAsync) {
return false;
}
// See https://docs.microsoft.com/en-us/windows/desktop/api/winbase/ns-winbase-_commtimeouts#remarks
timeouts.ReadIntervalTimeout = MAXDWORD;
timeouts.ReadTotalTimeoutMultiplier = MAXDWORD;
timeouts.ReadTotalTimeoutConstant = 100;
timeouts.WriteTotalTimeoutConstant = 10000;
timeouts.WriteTotalTimeoutMultiplier = 0;