pub struct TunaServer { /* private fields */ }Expand description
The server to tuna web. Will deal with both serving of HTTP content and the websockets used for management.
Implementations§
Source§impl TunaServer
impl TunaServer
Sourcepub fn new(port: u16) -> Result<Self>
pub fn new(port: u16) -> Result<Self>
Create a new Tuna Web server. Will serve HTTP on the specified port, and
websocket traffic on the subsequent port (port + 1).
Sourcepub fn work_http(&mut self)
pub fn work_http(&mut self)
Update the HTTP server, draining the request queue before returning.
Sourcepub fn work_websocket(&mut self)
pub fn work_websocket(&mut self)
Update the websocket server, draining the connection queue before returning.
Auto Trait Implementations§
impl Freeze for TunaServer
impl RefUnwindSafe for TunaServer
impl Send for TunaServer
impl Sync for TunaServer
impl Unpin for TunaServer
impl UnwindSafe for TunaServer
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