Struct tungstenite::handshake::server::ServerHandshake
source · pub struct ServerHandshake<S, C> { /* private fields */ }
Expand description
Server handshake role.
Implementations
sourceimpl<S: Read + Write, C: Callback> ServerHandshake<S, C>
impl<S: Read + Write, C: Callback> ServerHandshake<S, C>
sourcepub fn start(
stream: S,
callback: C,
config: Option<WebSocketConfig>
) -> MidHandshake<Self>
pub fn start(
stream: S,
callback: C,
config: Option<WebSocketConfig>
) -> MidHandshake<Self>
Start server handshake. callback
specifies a custom callback which the user can pass to
the handshake, this callback will be called when the a websocket client connnects to the
server, you can specify the callback if you want to add additional header to the client
upon join based on the incoming headers.
Trait Implementations
sourceimpl<S: Debug, C: Debug> Debug for ServerHandshake<S, C>
impl<S: Debug, C: Debug> Debug for ServerHandshake<S, C>
impl<S: Read + Write, C: Callback> HandshakeRole for ServerHandshake<S, C>
Auto Trait Implementations
impl<S, C> RefUnwindSafe for ServerHandshake<S, C>where
C: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, C> Send for ServerHandshake<S, C>where
C: Send,
S: Send,
impl<S, C> Sync for ServerHandshake<S, C>where
C: Sync,
S: Sync,
impl<S, C> Unpin for ServerHandshake<S, C>where
C: Unpin,
S: Unpin,
impl<S, C> UnwindSafe for ServerHandshake<S, C>where
C: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more