-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(webSocket): create documentation for the operator #2450
Conversation
The document updates were really helpful. Thank you! |
+1 Great document! |
I see there's a conflict now, but what's the status of this PR? Why hasn't it been merged yet? |
I'll solve conflicts tommorow and ping maintainers. It wasn't merged because it needs to be reviewed still. :) |
Generated by 🚫 dangerJS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost perfect. Just need to subscribe in the pushing messages example. Also be sure to explain that it's queuing messages to be sent until connection occurs.
* @param {string | WebSocketSubjectConfig} urlConfigOrSource the source of the websocket as an url or a structure defining the websocket object | ||
* @return {WebSocketSubject} | ||
* @example <caption>Pushing messages to the server.</caption> | ||
* const subject = Rx.Observable.webSocket('ws://localhost:8081'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example is slightly off, in that it won't push the messages to the server unless you're subscribed. That's when it connects. It will queue the messages and wait for a connection before you subscribe, but at some point you have to subscribe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added subscription with a comment in the example.
In the text there is already a line which states that sent values are buffered without connection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a matter of fact, it is still off, since I subscribe and complete immediately after, which I guess means nothing will be sent anyways.
But to make it 100% legit I would have to use openObserver, which would make example super convoluted for newcomers, so for educational reasons I left it as is, hoping comments are clear enough
Create documentation describing what paramaters webSocket operator accepts and what it returns. Describe WebSocketSubject API - both how Subject methods behave and what additional multiplex operator does. Add examples for receiving messages, sending messages and multiplexing sockets. Describe properties of WebSocketSubjectConfig object.
Really glad I found this documentation! |
I would love it if we could get these docs updated at merged. The files have moved though, probably better to start a new PR and copy things over. @mpodlasin can you do that? This time I'll merge them quickly. |
Thanks again, @mpodlasin ... finally merged. |
Awesome! |
Uff.. This one was really dense. ;)
Description
Related
I had problems justifying some desing decisions. Answering those might help me create better descriptions:
#2445
#2442