I have a thread where I am opening a socket, and executing it, waiting to receive strings from the other side. It is working fine compiled on Delphi 7 on all Windows version, yet compiled with Delphi 11 - it working on the rest of the Windows versions, except 11. Under Windows 11 I am getting the Socket.ReceiveText to be empty and Socket.ReceiveLength to be always 0.
TThread_Connection_Main = class( TThread )
Socket: TCustomWinSocket;
constructor Create(aSocket: TCustomWinSocket); overload;
procedure Execute; override;
end;
procedure TThread_Connection_Main.Execute;
begin
inherited
while Socket.Connected do
begin
Sleep( 2);
if ( Socket = nil ) or not( Socket.Connected ) then
Break;
if Socket.ReceiveLength < 1 then
Continue;
...
end;
end;
- Is there something specific which have to be done for Windows 11 sockets compatibility with Delphi 11 ?
P.S: Just found out that the issue exists with Delphi 10.4 as well.