mirror of
https://github.com/defold/extension-websocket.git
synced 2025-06-27 09:47:44 +02:00
Issue 18: Documentation fix
This commit is contained in:
parent
94bcc82f25
commit
2c9c0b74f1
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user