[−][src]Struct engine_io_server::server::Server
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]
&'_ self,
context: RequestContext
) -> Result<HandleRequestResult, ServerError>
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]
&'_ self,
sid: Option<&'_ String>,
upgrade: bool,
transport_kind: TransportKind,
http_method: HttpMethod
) -> Result<(), ServerError>
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]
&'_ self,
context: RequestContext
) -> Result<String, ServerError>
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]
&'_ self,
id: &'_ str
) -> Result<Arc<AsyncMutex<Socket<A>>>, ServerError>
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,
<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,
<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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,