Struct jamsocket_server::ClientSocketConnection [−][src]
pub struct ClientSocketConnection {
pub room: Recipient<MessageFromClient>,
pub client_id: ClientId,
pub room_id: String,
pub ip: String,
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: ClientIdroom_id: Stringip: Stringlast_seen: Instantheartbeat_interval: Durationheartbeat_timeout: Durationinterval_handle: Option<SpawnHandle>Trait Implementations
type Context = WebsocketContext<Self>
type Context = WebsocketContext<Self>
Actor execution context type
Called after an actor is in Actor::Stopping state. Read more
Start a new asynchronous actor, returning its address. Read more
Construct and start a new asynchronous actor, returning its address. Read more
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
Self: StreamHandler<<S as Stream>::Item>,
S: Stream + 'static,
Self::Context: AsyncContext<Self>,
fn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandle where
Self: StreamHandler<<S as Stream>::Item>,
S: Stream + 'static,
Self::Context: AsyncContext<Self>,
Register a Stream to the actor context.