Am 21.09.2015 17:58 schrieb "Bo Berglund" <[email protected]>: > > On Mon, 21 Sep 2015 17:24:50 +0200, Sven Barth > <[email protected]> wrote: > > >Am 21.09.2015 16:42 schrieb "Bo Berglund" <[email protected]>: > >> Unfortunately since the existing code is built on non-blocking serial > >> communications and events to handle the data reception I am at a loss > >> right now concerning what TCP socket component to use. > >> Indy is blocking, synapse is blocking and ICS being non-blocking is > >> not open for commercial use and even so not really maintained for FPC > >> either... > > > >You could take a look at the TInetSocket of the ssockets unit which is part > >of FPC (at least in 3.0.0, don't remember about 2.6.4). > > I tried to find information on this but it seems a bit difficult... > Since I have Lazarus installed in my Win7 PC it would be good to know > where in the installation I might find the units for this component. > A search from the top of Lazarus finds a number of files with socket > in their names but no ssocket file at all. > The sockets.pas file I found indicates that it is for OS/2 only
As I said it might be that you need at least 3.0.0. But you could try to install the release candidate for that. The code should be in lazarusdir/fpc/VER/packages/fcl-net/src (Note: path might be not entirely correct as I don't have a Windows installation of Lazarus in front of me right now). > > I also found a wiki page http://wiki.freepascal.org/Sockets where some > info could be gleaned. > But I am worried that this component actually is TEXT oriented such > that it strips off/adds line endings to whatever is sent/received... No, that's a different unit/component/class... > Could you confirm that the TSocketClient can actually handle raw > binary data such taht one can send/receive a binary file over the TCP > connection? > If tha is the case then it might just be what I need to implement my > simple serial port interface via TCP/IP. I can't say anything about TSocketClient, but the TInetClient in the ssockets unit I mentioned is a class that's rather directly on top of the native socket API, so that should definitely be able to handle it. Regards, Sven
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
