The server sends back an error on failed registration and sends chat messages to all players, not just the sender. The non-blocking socket function was moved to a new file in the common folder so the client can use it.