[fpc-pascal] How to implement a simple tcp/ip connection?

Giuliano Colla giuliano.colla at fastwebnet.it
Tue May 19 18:25:54 CEST 2020

I'm struggling with a similar problem. It would appear that the easiest 
way would be just take advantage of the Sockets unit. You only must 
define some more constants, such as SO_REUSEPORT and SOCK_NONBLOCK which 
are missing in fpc.

I just made some preliminary tests, and it looks like it's not so 
difficult to implement something quite compatible with Delphi 
philosophy. The SOCK_NONBLOCK flag is one of the keys.

Now I'm planning to look in more detail the old Delphi implementation, 
in order to see how they were tacking advantage of Libc. If you're 
interested I'll let you know my results.


Il 16/05/2020 20:13, Bo Berglund via fpc-pascal ha scritto:
> I am myself struggling with this problem right now converting an old
> Windows service application that is configured from a Delphi
> programmed client operating over TCP/IP sockets. And it uses
> TClientSocket and TServerSocket....
> I am going to try LNet hoping it will not bee too different from the
> Delphi native components...
> (Note: Delphi 7/Delphi 2007)

Do not do to others as you would have them do to you.They might have different tastes.

More information about the fpc-pascal mailing list