Webscokcet my settings:
function init ()
end
OnBeat function ()
??
end
function onMessage (uid, msg)
?? broadcast (uid, msg)
?? return ""
end
onConnect function (uid)
?? return ""
end
OnDisconnect function (uid)
?? return ""
function onMessage (uid, msg) - Called When a user sends a message
- Uid (string): userid of user messaging server
- Msg (string): message received
sendto (uid, msg) - Send a message to a user by Their uid
- Uid (string): userid of who will receive msg
- Msg (string): message to be sent
end
This is the configuration of my websocket. What I search is the following:
The player presses a button, it sends a message such as "Hello" and the second player receives this message in a text box, and can respoder, to pressed another button.
How I can do this? I am crazy, trying to create this.