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

Bo Berglund bo.berglund at gmail.com
Sat May 16 20:13:38 CEST 2020


On Thu, 14 May 2020 22:02:01 +0100, Graeme Geldenhuys
<mailinglists at geldenhuys.co.uk> wrote:

>On 14/05/2020 5:21 pm, Giuliano Colla wrote:
>> I need to implement a simple dedicated TCP/IP connection between a 
>> client and a server. 
>
>You can always use the Indy TCP components too. I've used them for years
>under Delphi and FPC with great success. Huge amounts of protocols are
>implement and loads of examples available.
>
>  SVN:  svn.atozed.com
>  Git (mirror):  github.com/graemeg/indy
>

Well the simplest way to get Indy10 into Lazarus is via Online Package
Manager! Searh for Indy and it will find Indy10 for you.
THe package is named indylaz.

That said (I also use Indy a lot) if one converts a program from
Delphi where one has used the TServerSocket or TClientSocket classes
it is a rather steep climb since Indy10 is entirely blocking and the
Delphi components were event driven.

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)


-- 
Bo Berglund
Developer in Sweden



More information about the fpc-pascal mailing list