[][src]Struct engine_io_server::server::Server

pub struct Server<A: 'static + Adapter> { /* fields omitted */ }

Implementations

impl<A: 'static + Adapter> Server<A>[src]

pub fn new(options: ServerOptions) -> Self[src]

pub async fn subscribe<'_>(&'_ self) -> Receiver<ServerEvent>[src]

pub async fn close<'_>(&'_ self)[src]

pub async fn handle_request<'_>(
    &'_ self,
    context: RequestContext
) -> Result<HandleRequestResult, ServerError>
[src]

Returns HandleRequestResult, where it tells the adapter to do certain things like setting a cookie.

pub fn handle_upgrade(&self)[src]

pub async fn verify_request<'_, '_>(
    &'_ self,
    sid: Option<&'_ String>,
    upgrade: bool,
    transport_kind: TransportKind,
    http_method: HttpMethod
) -> Result<(), ServerError>
[src]

pub fn generate_id(&self) -> String[src]

Generate a new ID for a client. Note: This generates IDs in a different format from the original JS engine.io implementation, which uses a library called base64id that doesn't seem to guarantee uniqueness.

pub async fn handshake<'_>(
    &'_ self,
    context: RequestContext
) -> Result<String, ServerError>
[src]

Returns the new client ID

pub async fn clients_count<'_>(&'_ self) -> usize[src]

pub async fn get_client_or_error<'_, '_>(
    &'_ self,
    id: &'_ str
) -> Result<Arc<AsyncMutex<Socket<A>>>, ServerError>
[src]

Auto Trait Implementations

impl<A> !RefUnwindSafe for Server<A>

impl<A> Send for Server<A> where
    <A as Adapter>::Polling: Send,
    <A as Adapter>::WebSocket: Send

impl<A> Sync for Server<A> where
    <A as Adapter>::Polling: Send,
    <A as Adapter>::WebSocket: Send

impl<A> Unpin for Server<A>

impl<A> !UnwindSafe for Server<A>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,