Struct ServerHandshake

struct ServerHandshake<S, C> { ... }

Server handshake role.

Implementations

impl<S: Read + Write, C: Callback> ServerHandshake<S, C>

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 connects 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.

impl<S, C> Freeze for ServerHandshake<S, C>

impl<S, C> RefUnwindSafe for ServerHandshake<S, C>

impl<S, C> Send for ServerHandshake<S, C>

impl<S, C> Sync for ServerHandshake<S, C>

impl<S, C> Unpin for ServerHandshake<S, C>

impl<S, C> UnsafeUnpin for ServerHandshake<S, C>

impl<S, C> UnwindSafe for ServerHandshake<S, C>

impl<S: $crate::fmt::Debug, C: $crate::fmt::Debug> Debug for ServerHandshake<S, C>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<S: Read + Write, C: Callback> HandshakeRole for ServerHandshake<S, C>

impl<T> Any for ServerHandshake<S, C>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for ServerHandshake<S, C>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for ServerHandshake<S, C>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for ServerHandshake<S, C>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Same for ServerHandshake<S, C>

impl<T, U> Into for ServerHandshake<S, C>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for ServerHandshake<S, C>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for ServerHandshake<S, C>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<V, T> VZip for ServerHandshake<S, C>

fn vzip(self: Self) -> V