We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 921e04d commit d06eb6eCopy full SHA for d06eb6e
doc/modules/http.websocket.md
@@ -53,6 +53,16 @@ The opcode `0x1` will be returned as `"text"` and `0x2` will be returned as `"bi
53
54
Iterator over [`websocket:receive()`](#http.websocket:receive).
55
56
+#### Example {#http.websocket:each-example}
57
+
58
+```lua
59
+local ws = websocket.new_from_uri("wss://echo.websocket.org")
60
+assert(ws:connect())
61
62
+for data, opcode in ws:each() do
63
+ print(data, opcode)
64
+end
65
+```
66
67
### `websocket:send_frame(frame, timeout)` <!-- --> {#http.websocket:send_frame}
68
0 commit comments