Hacking away at this again.

Client can now connect to server properly. Still need to implement
received packet handling properly (like for the server).