Gateway Client Protocol • Rust AI Agent SDK
GatewayClientProtocol: Protocol for gateway client connections. Clients are external connections (WebSocket, HTTP, etc.) that communicate with agents through the gateway.
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) -> &strUnique client identifier.
is_connected
fn is_connected(&self) -> boolWhether the client is currently connected.
connected_at
fn connected_at(&self) -> f64Connection timestamp.
send
async fn send(&self, event: GatewayEvent) -> Result<()>Send an event to the client.
Parameters:
| Name | Type |
|---|---|
event | GatewayEvent |
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 GitHubpraisonai/src/gateway/mod.rs at line 0