final working basic tcp client