converting to TCP
broadcasting and logging in
fixing formatting problem when tcp client sends \n