hello,
for tcp server, you can have a look to the nxnetworktest project (which uses synapse) from nxpascal project :
1 - download last synapse stable version and install lazarus synapse package (laz_synapse).
2 - from
here download zip . Extract
nxnetworktest (demos/fpc/nxnetworktest)
3 - add
nxnetwork.pas (src/nxnetwork.pas ) in the folder
4 - add nxnetwork.pas to the project and laz_synapse as required package
5 - if you are under linux add -dUseCThreads to compiler options.
Friendly, J.P