My recommendation would be: Skip low level TCP/IP services which are difficult to program and write a high level API using HTTP. You can either use existing Web server tools or - you can build something simple with sockets or plug-in something like HttpListener through .NET.
Really in this day and age there's little reason to screw around with TCP/IP. If you need need transaction - request/response, HTTP is a much better choice. If you need connected real time interfaces you can interface via Web Sockets, using .NET and SignalR called from FoxPro, which can work very well all without the pain of low level socket listeners and all the pain that Socket ActiveX controls cause in VFP's single threaded environment.
+++ Rick ---
>Hi Gang!
>
>I am being tasked with implementing a brand new interface between our old POS software and a new Pharmacy program.
>
>The Pharmacy program will be the client sending data over to the POS regularly and sometimes query info from the POS system.
>
>The POS system will behave as a Server, responding to the Client Pharmacy program.
>
>
>The Pharmacy Client will connect to our POS and maintain the connection. If dropped, it will try to reconnect to the POS.
>
>
>We have SOCKETOOLS and SOCKETWRENCH from Catalyst Software
https://sockettools.com/ for developing Client / Server systems.
>
>
>I've written many Client's using Socketools and VFP, but never a Server from scratch.
>
>Any ideas ? or suggestions ?
>
>Thanks
>Tommy