Create Connection class to handle the WebSocket connection