Exercise
- Open exercise on codesandboxio.
I've imported the necessary
webSocket()operator for you. - Create a new
WebSocketSubjectusing thewebSocket()operator, set the generic type for the next notification tostring, and set the url towss://echo.websocket.org. - Emit a next notification on the newly created
WebSocketSubjectusing thenext()method. - Subscribe to the
WebSocketSubjectinstance. - Send some additional messages to the WebSocket.
- Close the WebSocket connection by invoking the
complete()method on theWebSocketSubjectinstance.