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@6800 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
f0712dd9c1
commit
fa0d3e931b
4 changed files with 11 additions and 0 deletions
|
|
@ -123,6 +123,10 @@ bool Ctrl::IsWaitingEvent()
|
|||
while(socket.Timeout(0).WaitRead()) {
|
||||
socket.Timeout(20000);
|
||||
String s = websocket.Recieve();
|
||||
if(s.IsVoid()) { // No data returned -> means EOF was reached
|
||||
TurtleWhenDisconnect();
|
||||
Exit(0);
|
||||
}
|
||||
LLOG("Recieved data " << s);
|
||||
StringStream ss(s);
|
||||
while(!ss.IsEof())
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ String TurtleStream::FlushStream()
|
|||
return s;
|
||||
}
|
||||
|
||||
Callback TurtleWhenDisconnect;
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ public:
|
|||
};
|
||||
|
||||
extern TurtleStream turtle_stream;
|
||||
extern Callback TurtleWhenDisconnect;
|
||||
|
||||
class SystemDraw : public SDraw {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -312,6 +312,8 @@ INITBLOCK {
|
|||
CONSOLE_APP_MAIN
|
||||
{
|
||||
StdLogSetup(LOG_COUT|LOG_FILE);
|
||||
|
||||
LOG("Session Started");
|
||||
|
||||
#ifdef _DEBUG
|
||||
MemoryLimitKb(10000);
|
||||
|
|
@ -339,4 +341,6 @@ CONSOLE_APP_MAIN
|
|||
StoreToFile(callback(UWord::SerializeApp));
|
||||
|
||||
UPP::Ctrl::CloseTopCtrls();
|
||||
|
||||
LOG("Session Finished");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue