Dispatching of events in own thread, to somewhat counter problems with long running events.

This commit is contained in:
Stefan Persson 2012-02-23 15:44:36 +01:00
parent f34e1ad53f
commit c049b97a64
8 changed files with 293 additions and 104 deletions

View file

@ -95,7 +95,7 @@ std::wstring Socket::read(int timeout){
BOOL fSuccess = false;
std::wstring returnString;
bool moreData = true;
while(moreData){
moreData = false;
memset(&buf, 0, sizeof(buf));
@ -117,7 +117,7 @@ std::wstring Socket::read(int timeout){
// Cancel, we still need to cleanup
}
fSuccess = GetOverlappedResult(d->hPipe, &oOverlap, &cbBytesRead, true);
if (!fSuccess) {
DWORD err = GetLastError();