Socket defines how to connect via websocket. Therefore, it needs an baseUrl and an optional list of protocols. The Session will be established after calling the connect method.
Creates a Session by trying to connect to the websocket endpoint. When connection was successfully made, you can send and receive message via websockets.