doc/modules/http.websocket.md: Add usage example to websocket:each()#118
doc/modules/http.websocket.md: Add usage example to websocket:each()#118hollunder wants to merge 1 commit intodaurnimator:masterfrom
Conversation
| @@ -53,6 +53,15 @@ The opcode `0x1` will be returned as `"text"` and `0x2` will be returned as `"bi | |||
|
|
|||
| Iterator over [`websocket:receive()`](#http.websocket:receive). | |||
|
|
|||
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
doc/modules/http.websocket.md
Outdated
| for data, opcode in ws:each() do | ||
| print(data, opcode) | ||
| end | ||
|
|
daurnimator
left a comment
There was a problem hiding this comment.
Could you squash down your commits and use a commit message that matches the general form of the project?
doc/modules/http.websocket.md
Outdated
|
|
||
| Iterator over [`websocket:receive()`](#http.websocket:receive). | ||
|
|
||
| #### Example {#http.websocket.each-example} |
There was a problem hiding this comment.
Minor nit: this should be :each not .each
|
I hope it's OK now, I'm new to the whole PR workflow (and not that well versed in git either). |
|
I'm a bit worried about the usefulness of the example beyond the general use of an iterator. |
|
Do you want to edit your PR further? Or do you think it improves the current docs and should be merged? |
|
Ping @hollunder ? |
Since it wasn't obvious to me how to use each() I figure it would be useful to have a little example in the documentation.