Updated server code: sends connection message to all clients.