1. Are your devices using UDP or TCP as a socket server?
2. What kind of protocol is used at the higher levels in the stack (>=session) ? Is it your own internal custom protocol, or one of the classic protocols out there? Kepware can be a solution if you use one of the supported protocols from its drivers suite.
3. Can you deploy additional agents in your devices (does it have user storage and memory)? If yes, using one of our Edge SDKs to create an implementation which you will deploy on the devices is one option which is optimal from the flexibility standpoint.
If you can't deploy agents on the device, then you essentially have two options: Option A: if you are looking for a fast proof of concept, creating a server-side extension using the ThingWorx Extension SDK works (I did that in the past for multiple PoCs). However, this typically does not scale in case of tens of thousands of devices (exceptions exist though). Option B: develop an edge implementation using one of the ThingWorx Edge SDKs that will live out of process, typically in a separate VM to the one where the ThingWorx platform resides. Same task or logic as the Option A, the only difference is where it lives. This option scales better than the server-side extension since it does not share the same resources with the platform server.