.developing Turtle

git-svn-id: svn://ultimatepp.org/upp/trunk@6775 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-01-14 13:30:37 +00:00
parent 3479685e4b
commit 3b7837a42a

View file

@ -63,6 +63,8 @@ bool Ctrl::Connect()
}
}
RLOG("Connection established");
if(socket.IsError())
RLOG("CONNECT ERROR: " << socket.GetErrorDesc());
return true;
}
@ -101,6 +103,7 @@ void Ctrl::TimerAndPaint()
String s = ZCompress(content);
if(content.GetCount() > 10)
RLOG("Sending " << s.GetLength());
socket.Timeout(20000);
websocket.SendBinary(s);
content.Clear();
}
@ -116,6 +119,9 @@ bool Ctrl::IsWaitingEvent()
while(!ss.IsEof())
event_queue.AddTail(ss.GetLine());
}
socket.Timeout(20000);
if(socket.IsError())
RLOG("ERROR: " << socket.GetErrorDesc());
return event_queue.GetCount();
}
@ -143,6 +149,7 @@ void Ctrl::GuiSleep(int ms)
// LLOG("GuiSleep");
int level = LeaveGuiMutexAll();
socket.Timeout(ms).WaitRead();
socket.Timeout(20000);
EnterGuiMutex(level);
}