I m in process of migrate delphi app to linux.
Now, the same code under Delphi/Windows work but in Lazarus/Linux
returns a socket error 13 (permision denegated?)
The code:
function TListenandTalkThreadUDP.InicializarEnvio(var Error: Integer):
boolean;
begin
FUDPSockettoSend := TUDPBlockSocket.Create();
FUDPSockettoSend.CreateSocket;
FUDPSockettoSend.Connect(FIP, 23); <------------------- FIP is 127.0.0.1
Error := FUDPSockettoSend.LastError;
result := (Error = 0);
end;
function TListenandTalkThreadUDP.InicializarRecepcion(var Error:
Integer): boolean;
begin
FUDPSockettoListen := TUDPBlockSocket.Create();
FUDPSockettoListen.CreateSocket;
FUDPSockettoListen.Bind('0.0.0.0',24); <--------------- That FAILS
with error 13
Error := FUDPSockettoListen.LastError; <----------------
Here get error 13
result := (Error = 0);
end;
procedure TListenandTalkThread.Execute;
var
Reintentos : Byte;
aPaqueteaEnviar : String;
begin
if not InicializarEnvio(LastError) then
begin
raise Exception.create('Problemas con Envio Error:
'+IntToStr(LastError));
end;
if not InicializarRecepcion(LastError) then
begin
raise Exception.create('Problemas con socket Recepcion Error:
'+IntToStr(LastError));
end;
...
Also try with same results changing to
FUDPSockettoListen.Bind('127.0.0.1',24); <--------------- That FAILS
with error 13
or to the local ip
FUDPSockettoListen.Bind('192.168.1.46',24); <--------------- That
FAILS with error 13
Any idea? Im lost because it works on windows.
TIA
--
Donald
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public