Usermode/AxWin4 - Send mouse/keyboard events to client
[tpg/acess2.git] / Usermode / Libraries / libaxwin4.so_src / ipc.cpp
index a262a9e..e42d406 100644 (file)
@@ -86,6 +86,15 @@ void RecvMessage(CDeserialiser& message)
        _SysDebug("RecvMessage: id=%i", id);
        switch(id)
        {
+       case IPCMSG_PING:
+               // If we hear ping, we must pong
+               {
+               CSerialiser     pong;
+               pong.WriteU8(IPCMSG_REPLY);
+               pong.WriteU8(IPCMSG_PING);
+               SendMessage(pong);
+               }
+               break;
        case IPCMSG_REPLY:
                // Flag reply and take a copy of this message
                if( !gSyncReplyActive )
@@ -103,6 +112,9 @@ void RecvMessage(CDeserialiser& message)
                        gSyncReplyBuf = message;
                }
                break;
+       // TODO: Handle messages from server (input events, IPC)
+       // TODO: If an event is currently being processed, save the message in a queue to be handled when processing is complete
+       // - This will prevent deep recursion (and make server errors aparent)
        default:
                _SysDebug("TODO: RecvMessage(%i)", id);
                break;

UCC git Repository :: git.ucc.asn.au