equal
deleted
inserted
replaced
156 i:= SDLNet_TCP_Recv(IPCSock, @buf[1], 255 - Length(ss)); |
156 i:= SDLNet_TCP_Recv(IPCSock, @buf[1], 255 - Length(ss)); |
157 if i > 0 then |
157 if i > 0 then |
158 begin |
158 begin |
159 buf[0]:= i; |
159 buf[0]:= i; |
160 ss:= ss + s; |
160 ss:= ss + s; |
161 while (Length(ss) > 1)and(Length(ss) > byte(ss[1])) do |
161 while (Length(ss) > 1) and (Length(ss) > byte(ss[1])) do |
162 begin |
162 begin |
163 ParseIPCCommand(copy(ss, 2, byte(ss[1]))); |
163 ParseIPCCommand(copy(ss, 2, byte(ss[1]))); |
164 Delete(ss, 1, Succ(byte(ss[1]))) |
164 Delete(ss, 1, Succ(byte(ss[1]))) |
165 end |
165 end |
166 end else OutError('IPC connection lost', true) |
166 end else OutError('IPC connection lost', true) |
203 if IPCSock <> nil then |
203 if IPCSock <> nil then |
204 begin |
204 begin |
205 SendEmptyPacketTicks:= 0; |
205 SendEmptyPacketTicks:= 0; |
206 if s[0]>#251 then s[0]:= #251; |
206 if s[0]>#251 then s[0]:= #251; |
207 SDLNet_Write16(GameTicks, @s[Succ(byte(s[0]))]); |
207 SDLNet_Write16(GameTicks, @s[Succ(byte(s[0]))]); |
208 {$IFDEF DEBUGFILE}AddFileLog('IPC send: '+s[1]);{$ENDIF} |
208 {$IFDEF DEBUGFILE}AddFileLog('IPC send: '+ s[1]);{$ENDIF} |
209 inc(s[0], 2); |
209 inc(s[0], 2); |
210 SDLNet_TCP_Send(IPCSock, @s, Succ(byte(s[0]))) |
210 SDLNet_TCP_Send(IPCSock, @s, Succ(byte(s[0]))) |
211 end |
211 end |
212 end; |
212 end; |
213 |
213 |