MessageHandler

Trait MessageHandler 

Source
pub trait MessageHandler: Send + Sync {
    // Required method
    fn handle_message(&self, client_id: ClientId, type_name: &str, data: &[u8]);
}
Expand description

Trait for handling incoming messages

Implement this trait to process messages from clients.

Required Methods§

Source

fn handle_message(&self, client_id: ClientId, type_name: &str, data: &[u8])

Handle a message from a specific client

§Arguments
  • client_id - ID of the client that sent the message
  • type_name - Message type name (e.g., “TRANSFORM”)
  • data - Raw message data (header + body)

Implementors§