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