pub struct WebSocketServer { /* private fields */ }Implementations§
Source§impl WebSocketServer
impl WebSocketServer
pub fn new( bind_addr: SocketAddr, bus_manager: BusManager, entity_cache: EntityCache, view_index: Arc<ViewIndex>, ) -> Self
pub fn with_max_clients(self, max_clients: usize) -> Self
pub fn with_auth_plugin(self, auth_plugin: Arc<dyn WebSocketAuthPlugin>) -> Self
pub fn with_usage_emitter( self, usage_emitter: Arc<dyn WebSocketUsageEmitter>, ) -> Self
Sourcepub fn with_journal(self, journal: Arc<EventJournal>) -> Self
pub fn with_journal(self, journal: Arc<EventJournal>) -> Self
Serve replayable append subscriptions from the retained event journal.
pub fn with_rate_limit_config(self, config: RateLimitConfig) -> Self
pub fn with_delivery_config(self, config: WebSocketDeliveryConfig) -> Self
Sourcepub async fn start(self) -> Result<()>
pub async fn start(self) -> Result<()>
Bind the configured address and serve connections until the task is
dropped. Equivalent to into_acceptor followed by
[ConnectionAcceptor::serve_listener].
Auto Trait Implementations§
impl !RefUnwindSafe for WebSocketServer
impl !UnwindSafe for WebSocketServer
impl Freeze for WebSocketServer
impl Send for WebSocketServer
impl Sync for WebSocketServer
impl Unpin for WebSocketServer
impl UnsafeUnpin for WebSocketServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more