mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:27:33 +00:00
fix build on windows
This commit is contained in:
+10
-9
@@ -20,13 +20,14 @@ unit CATTcp;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, SyncObjs,
|
||||
Classes, SysUtils,
|
||||
WebUtils, // SockClose, SockShutdown, SOCK_INVALID
|
||||
{$IFDEF MSWINDOWS}
|
||||
Windows, WinSock2
|
||||
Windows, WinSock2,
|
||||
{$ELSE}
|
||||
BaseUnix, Sockets
|
||||
{$ENDIF},
|
||||
BaseUnix, Sockets,
|
||||
{$ENDIF}
|
||||
SyncObjs,
|
||||
CATEngine;
|
||||
|
||||
const
|
||||
@@ -251,23 +252,23 @@ end;
|
||||
|
||||
procedure TCATTcpClientThread.SendData(const Msg: string; const IdLimit: TStringList);
|
||||
var
|
||||
i: Integer;
|
||||
send: Boolean;
|
||||
i: Integer;
|
||||
doSend: Boolean;
|
||||
begin
|
||||
if IdLimit = nil then begin
|
||||
SendStr(Msg);
|
||||
Exit;
|
||||
end;
|
||||
send := False;
|
||||
doSend := False;
|
||||
FIdLock.Acquire;
|
||||
try
|
||||
for i := 0 to FClientIds.Count-1 do
|
||||
if IdLimit.IndexOf(FClientIds[i]) >= 0 then begin
|
||||
send := True;
|
||||
doSend := True;
|
||||
Break;
|
||||
end;
|
||||
finally FIdLock.Release; end;
|
||||
if send then SendStr(Msg);
|
||||
if doSend then SendStr(Msg);
|
||||
end;
|
||||
|
||||
function TCATTcpClientThread.IsMarkedForDelete: Boolean;
|
||||
|
||||
Reference in New Issue
Block a user