pub struct ServerSocket { /* private fields */ }Available on crate feature
connect-server only.Expand description
A WebSocket an S2 Connect server accepted, as a transport an io::Driver can pump.
io::WebSocket is the client’s side of the same thing. They
are separate types because the two halves come from different libraries — a client
dials with tokio-tungstenite, a server upgrades with axum — and neither wants to
depend on the other’s stream type.
Implementations§
Trait Implementations§
Source§impl Debug for ServerSocket
impl Debug for ServerSocket
Source§impl TextTransport for ServerSocket
impl TextTransport for ServerSocket
Source§async fn send_text(&mut self, text: String) -> Result<(), Error>
async fn send_text(&mut self, text: String) -> Result<(), Error>
Available on crate feature
tokio only.Send one message.
Source§async fn recv_text(&mut self) -> Result<Option<String>, Error>
async fn recv_text(&mut self) -> Result<Option<String>, Error>
Available on crate feature
tokio only.Wait for one message.
None when the peer closed cleanly. Read moreAuto Trait Implementations§
impl !Freeze for ServerSocket
impl !RefUnwindSafe for ServerSocket
impl !Sync for ServerSocket
impl !UnwindSafe for ServerSocket
impl Send for ServerSocket
impl Unpin for ServerSocket
impl UnsafeUnpin for ServerSocket
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