This is a simple TCP client whch you can adapt to you needs:) By default I set the target_host to 'www.google.com', target_port to 80 and a HTTP GET request for the root path ("/") sent to the server with the host "google.com" using the HTTP/1.1 protocol.
This is a simple TCP server which you can adapt to your needs:) The default values for bind_ip and bind_port are '0.0.0.0' and 9999, so feel free to change those if need be.
Feel free to change these variables and I hope this helped:)