Skip to main content

odin_room_send_message

Sends arbitrary data to a list of target peers over the ODIN server. If NULL is specified, the message will be sent to all other peers in the same room.

info

It's up to the application to define the format and content of the data being sent. Many applications use JSON or protobufs to serialize data.

Declaration
OdinReturnCode odin_room_send_message(OdinRoomHandle room,
const uint64_t *peer_id_list,
size_t peer_id_list_size,
const uint8_t *data,
size_t data_length);

Parameters

room

Handle of the room to send the message in. See

OdinRoomHandle

for more information.

Declaration
OdinRoomHandle room;

peer_id_list

List of peer IDs to send the message to. If NULL, the message will be sent to all other peers in the same room.

Declaration
const uint64_t *peer_id_list;

peer_id_list_size

Number of peer IDs in the list.

Declaration
size_t peer_id_list_size;

data

Byte array containing the data to be sent.

Declaration
const uint8_t *data;

data_length

Length of the data array.

Declaration
size_t data_length;

Returns

A return code indicating success or failure. See

OdinReturnCode

for more information.

Return Type
OdinReturnCode