Socket and websocket connections