[Lazarus] TInetSocket usage - any documentation available?
Michael Van Canneyt
michael at freepascal.org
Wed Sep 23 10:21:58 CEST 2015
On Wed, 23 Sep 2015, Bo Berglund wrote:
> I have looked for a native FPC TCP/IP socket to use as a replacement
> for a serial port component and I discovered the ssockets unit that
> ships with FPC and contains a TInetSocket class.
> This seemed useful.
> The data shifted through the socket will be EXACTLY the same as was
> earlier transferred by RS232.
> Any suggestions on where I can find suitable documentation?
Shortly said: There is none.
If the various demo programs are not understandable for you, you are out of luck :(
Now, from what you describe, all you need to do is use the read/write
methods to send and receive data, just as in any stream: the client
TInetSock is a TStream descendent.
Thread programming is not so difficult, but I am not convinced that for the
use case you describe, threads are really needed (despite suggestions to the
contrary on this list).
More information about the Lazarus