pub struct WsServer<H: ParameterHost + 'static> { /* private fields */ }Expand description
WebSocket server for browser-based UI development
Implementations§
Source§impl<H: ParameterHost + 'static> WsServer<H>
impl<H: ParameterHost + 'static> WsServer<H>
Sourcepub fn new(port: u16, handler: Arc<IpcHandler<H>>) -> Self
pub fn new(port: u16, handler: Arc<IpcHandler<H>>) -> Self
Create a new WebSocket server
Sourcepub fn handle(&self) -> WsHandle
pub fn handle(&self) -> WsHandle
Get a lightweight handle for broadcasting to connected clients.
The returned WsHandle is non-generic, Clone, and can be moved
into async tasks (e.g., for forwarding meter updates from audio).
Sourcepub async fn broadcast_parameters_changed(&self) -> Result<(), Error>
pub async fn broadcast_parameters_changed(&self) -> Result<(), Error>
Broadcast a parametersChanged notification to all connected clients.
This is used by the hot-reload pipeline to notify the UI that parameters have been updated and should be re-fetched.
Auto Trait Implementations§
impl<H> Freeze for WsServer<H>
impl<H> !RefUnwindSafe for WsServer<H>
impl<H> Send for WsServer<H>
impl<H> Sync for WsServer<H>
impl<H> Unpin for WsServer<H>
impl<H> !UnwindSafe for WsServer<H>
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