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_rate_limit_config(self, config: RateLimitConfig) -> Self
pub fn with_rate_limit_config(self, config: RateLimitConfig) -> Self
Configure rate limiting for the WebSocket server.
This allows setting global rate limits that apply to all connections, such as maximum connections per IP, timeouts, and rate windows. Per-subject limits are controlled via AuthContext.Limits from the auth token.
pub async fn start(self) -> Result<()>
Auto Trait Implementations§
impl Freeze for WebSocketServer
impl !RefUnwindSafe for WebSocketServer
impl Send for WebSocketServer
impl Sync for WebSocketServer
impl Unpin for WebSocketServer
impl UnsafeUnpin for WebSocketServer
impl !UnwindSafe 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