Expand description
WebSocket transport implementations.
This module provides WebSocket-based implementations of the FEAGI networking traits
using the tungstenite crate with non-blocking sockets. All operations use
set_nonblocking(true) and check for WouldBlock, making them compatible
with any async runtime or synchronous usage.
§Socket Patterns
| Server | Client | Pattern |
|---|---|---|
FeagiWebSocketServerPublisher | FeagiWebSocketClientSubscriber | Pub/Sub (broadcast) |
FeagiWebSocketServerPuller | FeagiWebSocketClientPusher | Push/Pull (pipeline) |
FeagiWebSocketServerRouter | FeagiWebSocketClientRequester | Router/Dealer (req/rep) |
§Creating Instances
All server and client instances are created through their Properties types:
ⓘ
// Server example
let props = FeagiWebSocketServerPublisherProperties::new("127.0.0.1:8080")?;
let mut server = props.as_boxed_server_publisher();
// Client example
let props = FeagiWebSocketClientSubscriberProperties::new("ws://localhost:8080")?;
let mut client = props.as_boxed_client_subscriber();Structs§
- Feagi
WebSocket Client Pusher - A WebSocket client that pushes data to a server.
- Feagi
WebSocket Client Pusher Properties - Configuration properties for creating a WebSocket pusher client.
- Feagi
WebSocket Client Requester - A WebSocket client that sends requests and receives responses.
- Feagi
WebSocket Client Requester Properties - Configuration properties for creating a WebSocket requester client.
- Feagi
WebSocket Client Subscriber - A WebSocket client that subscribes to data from a publisher server.
- Feagi
WebSocket Client Subscriber Properties - Configuration properties for creating a WebSocket subscriber client.
- Feagi
WebSocket Server Publisher - A WebSocket server that broadcasts data to all connected clients.
- Feagi
WebSocket Server Publisher Properties - Configuration properties for creating a WebSocket publisher server.
- Feagi
WebSocket Server Puller - A WebSocket server that receives pushed data from clients.
- Feagi
WebSocket Server Puller Properties - Configuration properties for creating a WebSocket puller server.
- Feagi
WebSocket Server Router - A WebSocket server that handles request-response communication with multiple clients.
- Feagi
WebSocket Server Router Properties - Configuration properties for creating a WebSocket router server.