My goal is to make a simple TCP proxy application for my test lab. I want to modify some JSON data on the fly. I successfully managed to work a TCP client, and a TCP server, but individually, not at once.
Basically I want a PHP with 2 sockets, one for incoming clients, one for outgoing to server, and forward data to each other.