You are simply doing it wrong.
I could do this TCP server in another time at all and it would be perfect. I have done stuff that complicated and more many times.
You need to rethink how you are using the tool because you absolutely could get excellent results like I do.
The biggest things I suggest are... Treat it as collaboration or pair programming. Make sure to work through a design before programming and have it written to a file for your review before execution.
You can do this.