TCP in Ionic React - Capacitor

We have an application where we would like to connect to a local TCP network via wifi/hotspot.
We looked into a few solutions online but nothing was helpful in resolving them, we kept hitting blockers.

Can you let us know what would be a good approach to build it?