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

rust
fn client_id(&self) -> &str

Unique client identifier.

is_connected

rust
fn is_connected(&self) -> bool

Whether the client is currently connected.

connected_at

rust
fn connected_at(&self) -> f64

Connection timestamp.

send

rust
async fn send(&self, event: GatewayEvent) -> Result<()>

Send an event to the client.

Parameters:

NameType
eventGatewayEvent

receive

rust
async fn receive(&self) -> Result<GatewayEvent>

Receive an event from the client.

close

rust
async fn close(&self) -> Result<()>

Close the client connection.

Source

View on GitHub

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


Related Documentation