On Thu, 28 May 2020, Marco van de Voort wrote:
Op 2020-05-28 om 17:08 schreef Giuliano Colla:
Hi everybody,
I needed to implement a simple dedicated TCP/IP connection between a
client and a server. Nothing fancy, just sending and receiving short
strings.
I have used in the past for that purpose the unit Sockets lifting it
from Delphi/Kylix. This unit was taking advantage of libc, and this
makes it unusable today.
Instead of using heavy libraries such as Synapse, intended or other
purposes I believe I have found a simpler and cleaner solution by just
using the fpc Sockets unit.
This unit however doesn't provide all of the required functionalities.
Therefore I have implemented a small unit which I named klibc, which
provides the extra functions required such as fpinet_addr,
fpgethostbyname etc. and which i share which whomever has similar
problems.
Why not simply use cnetdb for those calls? Though in general, I would
just use Indy.
Did you read the mail ?
I consider Synapse light-weight.
But if Synapse is considered a "heavy library", then Indy is simply a black hole
in comparison....
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal