Hi,
I am trying this Indy code on Catalina (x86_64-darwin-cocoa) with the firewall disabled. (Lazarus 2.0.11 and FPC 3.2.0)
If I set port 80 I get a message 'Could not bind socket' as expected.
However when I try an open port the app just crashes.
Is macOs terminating my app because of security or is there another cause?
(My app works on Linux but not macOS)
procedure TForm1.TestIndy;
var Server : TIdTCPServer;
Binding: TIdSocketHandle;
begin
Server := TIdTCPServer.Create(Self);
Binding := Server.Bindings.Add;
Binding.IPVersion := Id_IPv4; //optional: forces the Binding to work in Id_IPV4 mode.
Binding.IP := '127.0.0.1';
Binding.Port := 9000; //if Port 80 Message 'Could not bind socket', if port 9000 app crashes
Server.OnExecute := @OnIndyTestExecute;
Server.Active := True;
end;
procedure TForm1.OnIndyTestExecute(AContext: TIdContext);
begin
//
end;