mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.developing Turtle
git-svn-id: svn://ultimatepp.org/upp/trunk@6775 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3479685e4b
commit
3b7837a42a
1 changed files with 7 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue