Swapped around server and client socket implementations. Master should be the server.
Fixed log messages always saying error... oops.