hedgewars/uIO.pas
changeset 159 63909aecb0ed
parent 155 401f4ea24715
child 183 57c2ef19f719
--- a/hedgewars/uIO.pas	Thu Sep 21 18:10:45 2006 +0000
+++ b/hedgewars/uIO.pas	Thu Sep 21 21:29:02 2006 +0000
@@ -42,6 +42,7 @@
 procedure SendIPCXY(cmd: char; X, Y: SmallInt);
 procedure SendIPCRaw(p: pointer; len: Longword);
 procedure SendIPCAndWaitReply(s: shortstring);
+procedure IPCWaitPongEvent;
 procedure IPCCheckSock;
 procedure InitIPC;
 procedure CloseIPC;
@@ -161,10 +162,8 @@
 SendIPC(s)
 end;
 
-procedure SendIPCAndWaitReply(s: shortstring);
+procedure IPCWaitPongEvent;
 begin
-SendIPC(s);
-SendIPC('?');
 isPonged:= false;
 repeat
    IPCCheckSock;
@@ -172,6 +171,13 @@
 until isPonged
 end;
 
+procedure SendIPCAndWaitReply(s: shortstring);
+begin
+SendIPC(s);
+SendIPC('?');
+IPCWaitPongEvent
+end;
+
 procedure NetGetNextCmd;
 var tmpflag: boolean;
 begin