Issue 18: Documentation fix

This commit is contained in:
JCash 2020-10-31 10:55:36 +01:00
parent 94bcc82f25
commit 2c9c0b74f1

View File

@ -55,11 +55,7 @@
- name: message - name: message
type: string type: string
desc: The received data. Only valid if event is `websocket.EVENT_MESSAGE` desc: The received data if event is `websocket.EVENT_MESSAGE`. Error message otherwise
- name: error
type: string
desc: The error string. Only valid if event is `websocket.EVENT_ERROR`
returns: returns:
@ -79,7 +75,7 @@
update_gui(self) update_gui(self)
log("Connected: " .. tostring(conn)) log("Connected: " .. tostring(conn))
elseif data.event == websocket.EVENT_ERROR then elseif data.event == websocket.EVENT_ERROR then
log("Error: '" .. data.error .. "'") log("Error: '" .. data.message .. "'")
elseif data.event == websocket.EVENT_MESSAGE then elseif data.event == websocket.EVENT_MESSAGE then
log("Receiving: '" .. tostring(data.message) .. "'") log("Receiving: '" .. tostring(data.message) .. "'")
end end