Struct jamsocket_server::ClientSocketConnection [−][src]
pub struct ClientSocketConnection {
pub room: Recipient<MessageFromClient>,
pub client_id: ClientId,
pub last_seen: Instant,
pub heartbeat_interval: Duration,
pub heartbeat_timeout: Duration,
pub interval_handle: Option<SpawnHandle>,
}
Expand description
Represents a connection from a service to a client, which consists of a message receiver and a user ID.
Fields
room: Recipient<MessageFromClient>
client_id: ClientId
last_seen: Instant
heartbeat_interval: Duration
heartbeat_timeout: Duration
interval_handle: Option<SpawnHandle>
Trait Implementations
type Context = WebsocketContext<Self>
type Context = WebsocketContext<Self>
Actor execution context type
fn stopping(&mut self, ctx: &mut Self::Context) -> Running
fn stopping(&mut self, ctx: &mut Self::Context) -> Running
Called after an actor is in Actor::Stopping
state. Read more
fn start(self) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
fn start(self) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
Start a new asynchronous actor, returning its address. Read more
fn start_default() -> Addr<Self> where
Self: Actor<Context = Context<Self>> + Default,
fn start_default() -> Addr<Self> where
Self: Actor<Context = Context<Self>> + Default,
Construct and start a new asynchronous actor, returning its address. Read more
fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
F: 'static + FnOnce(&mut Context<Self>) -> Self + Send,
fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
F: 'static + FnOnce(&mut Context<Self>) -> Self + Send,
Start new actor in arbiter’s thread.
Called for every message emitted by the stream.
fn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandle where
S: 'static + Stream,
Self: StreamHandler<<S as Stream>::Item>,
Self::Context: AsyncContext<Self>,
fn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandle where
S: 'static + Stream,
Self: StreamHandler<<S as Stream>::Item>,
Self::Context: AsyncContext<Self>,
Register a Stream to the actor context.
Auto Trait Implementations
impl !RefUnwindSafe for ClientSocketConnection
impl Send for ClientSocketConnection
impl Sync for ClientSocketConnection
impl Unpin for ClientSocketConnection
impl !UnwindSafe for ClientSocketConnection
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more