Skip to main content

GatewayClientProtocol

Defined in the gateway module.
Rust AI Agent SDK Protocol for gateway client connections. Clients are external connections (WebSocket, HTTP, etc.) that communicate with agents through the gateway.

Methods

client_id

fn client_id(&self) -> &str
Unique client identifier.

is_connected

fn is_connected(&self) -> bool
Whether the client is currently connected.

connected_at

fn connected_at(&self) -> f64
Connection timestamp.

send

async fn send(&self, event: GatewayEvent) -> Result<()>
Send an event to the client. Parameters:
NameType
eventGatewayEvent

receive

async fn receive(&self) -> Result<GatewayEvent>
Receive an event from the client.

close

async fn close(&self) -> Result<()>
Close the client connection.

Source

View on GitHub

praisonai/src/gateway/mod.rs at line 0