Updated TCP connection code

It is possible that everything but the playing of the game is complete.
About to test.