Skip to main content

Send Message

Send Message

Sends arbitrary data to a list of target peers to an ODIN room. Every peer connected to the same room will be able to receive the message.

Inputs

NameTypeDescription
Execexec
RoomobjectThe room in which the message is sent.
TargetsarrayList of targeted peer ids. If not specified, the message will be sent to all other peers in the same room.
DataarrayMessage data can be anything. This enables you to easily exchange data between peers directly over the Odin server.
On ErrordelegateDelegate to handle errors when sending a message.
On SuccessdelegateCalled when the message has been successfully sent.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the server has returned its response. Use the success value to check if the message has been successfully sent.
Successbooleantrue if the message has been successfully sent.