Skip to main content

OdinConnectionPoolSettings

typedef struct OdinConnectionPoolSettings {
void (*on_datagram)(uint64_t room_ref,
uint16_t media_id,
const uint8_t *bytes,
uint32_t bytes_length,
void *user_data);

void (*on_rpc)(uint64_t room_ref,
const uint8_t *bytes,
uint32_t bytes_length,
void *user_data);

void *user_data;
} OdinConnectionPoolSettings;

Overview

Settings for configuring connection pools to define a set of callback functions that a connection pool uses to notify the application about incoming events.

Members

on_datagram

Mandatory callback for incoming voice packets.

  • room_ref: The internal ID of the associated ODIN room handle.
  • media_id: The sender media ID.
  • bytes: The audio data buffer.
  • bytes_length: The length of the audio data buffer.
  • user_data: User-defined pointer for contextual information.

on_rpc

Mandatory callback for incoming RPC messages/events (MessagePack encoded).

  • room_ref: The internal ID of the associated ODIN room handle.
  • bytes: The message buffer (MessagePack encoded).
  • bytes_length: The length of the message buffer.
  • user_data: User-defined pointer for contextual information.

user_data

Optional user-defined data pointer, passed to all callbacks to provide a context or state.