pub struct OscServer { /* private fields */ }Expand description
OSC server for TouchOSC/Max/PD integration.
Listens on a UDP port for OSC messages and forwards them to a
NetBufferProducer for consumption by the audio thread.
Implementations§
Source§impl OscServer
impl OscServer
Sourcepub fn new(config: OscServerConfig, producer: NetBufferProducer) -> Self
pub fn new(config: OscServerConfig, producer: NetBufferProducer) -> Self
Create a new OSC server.
§Arguments
config- Server configurationproducer- Buffer producer for sending messages to audio thread
Sourcepub fn with_defaults(producer: NetBufferProducer) -> Self
pub fn with_defaults(producer: NetBufferProducer) -> Self
Create with default configuration.
Sourcepub fn run(self) -> Result<()>
pub fn run(self) -> Result<()>
Start the OSC server in the current thread (blocking).
This method blocks forever, listening for OSC messages. Call from a dedicated thread.
Sourcepub fn spawn(self) -> JoinHandle<Result<()>>
pub fn spawn(self) -> JoinHandle<Result<()>>
Start the OSC server in a background thread.
Returns a JoinHandle that can be used to wait for the server
to finish (which normally only happens on error).
Auto Trait Implementations§
impl Freeze for OscServer
impl !RefUnwindSafe for OscServer
impl Send for OscServer
impl Sync for OscServer
impl Unpin for OscServer
impl !UnwindSafe for OscServer
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