Implemented socket.io connection listener for testing