pub type WebSocketWrite = Option<Arc<RwLock<SplitSink<WebSocketStream<BoxedStream>, Message>>>>;Expand description
Handle used by services to push WebSocket messages back to a client.
Some(lock)— the service was invoked from the local WebSocket, which supports async back-channel notifications. Services can acquire the write lock and push arbitraryMessage::Text(_)frames.None— the service was invoked from the remote WebSocket (outbound connection towss.unpispas.es). There is no streaming back-channel; the service must respond only through the return value ofrun().
Use send_message from the pispas_modules::utils module to write
through the lock safely.
Aliased Type§
pub enum WebSocketWrite {
None,
Some(Arc<RwLock<SplitSink<WebSocketStream<BoxedStream>, Message>>>),
}Variants§
None
No value.
Some(Arc<RwLock<SplitSink<WebSocketStream<BoxedStream>, Message>>>)
Some value of type T.