[fpc-pascal] Re: Odyssey: SSockets and Threads.

silvioprog silvioprog at gmail.com
Thu Apr 25 16:57:38 CEST 2013

2013/4/25 Ludo Brands <ludo.brands at free.fr>

> [...]
> what is the problem with using Synapse, LNet or Indy? Seen the questions
> you are asking I would suggest you use an existing library and stay away
> from writing your own socket library or start with learning the basics
> of socket programming.

There no problem. Zeos has various features, auto-commit, script-executor,
monitor etc.., But I prefer using SQLdb even when SQLdb was starting. :)

I'm not trying to write a library. I'm trying to solve a problem but using
native units of Free Pascal (I miss a SktComp in Free Pascal, Delphi has it
and works fine). After I solving my problem, I want to send the sources to
be distributed in the samples of Free Pascal or Lazarus, so I'm avoiding
third-party libraries.

SOCK_STREAM sockets are full duplex and you can read and write
> simultaneously on them, even without threading if you use non blocking
> mode. SSocket has a Property NonBlocking but I don't see any code that
> handles the EAGAIN or EWOULDBLOCK errors. That is probably left to the
> user of TSocketStream to deal with. So SSocket is a really thin layer
> that leaves the user with all the problems you are trying to solve.
> Ludo

Very interesting this information. I'll study more and try to solve this

Thank you very much Ludo! :)

Silvio Cl├ęcio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130425/1a3f4472/attachment.html>

More information about the fpc-pascal mailing list