Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-09

Example of using TInetSocket, please

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

I am porting an application from Windows Delphi 2007 to FPC on Linux (Raspberry Pi2). In the process I need to switch from using RS232 to TCP/IP to communicate with a data source.

I have found that FPC contains the unit ssockets.pp, which implements a client socket class TInetSocket.

But I need a working example of how this is used so I can start testing if I can use it in my application.

Are there some examples of sending binary data between a TCP/IP server and the TInetSocket socket? If so please post links.

Bo Berglund Developer in Sweden
silvioprog
to Bo Berglund
Bo Berglund wrote
[...]

Are there some examples of sending binary data between a TCP/IP server

and the TInetSocket socket? If so please post links.

FPC has some TCP/IP (using TInetSocket) demos, and you can see that on its sources, eg:

Client: <FPC folder>\source\packages\fcl-base\examples\dsockcli.pp Server: <FPC folder>\source\packages\fcl-base\examples\dsocksvr.pp

And you can enjoy some third party demos too, take a look at this small project:

https://github.com/silvioprog/tcpipcomp

Good luck! =)

Silvio Clécio
Paul Breneman
to Bo Berglund: I am porting an application from Windows Delphi 2007 to FPC on Linux (Raspberry Pi2). In…
Bo Berglund wrote 12 lines
I am porting an application from Windows Delphi 2007 to FPC on Linux (Raspberry Pi2). In the process I need to switch from using RS232 to TCP/IP to communicate with a data source. I have found that FPC contains the unit ssockets.pp, which implements a client socket class TInetSocket. But I need a working example of how this is used so I can start testing if I can use it in my application. Are there some examples of sending binary data between a TCP/IP server and the TInetSocket socket? If so please post links.

www.CtrlTerm.com has a simple Synapse example.

Regards,
Paul
www.ControlPascal.com