MCPcopy Create free account
hub / github.com/actix/examples / pre_start

Method pre_start

websockets/echo/src/server.rs:84–92  ·  view source on GitHub ↗
(
        &self,
        myself: ActorRef<Self::Msg>,
        session: Self::Arguments,
    )

Source from the content-addressed store, hash-verified

82 type Arguments = actix_ws::Session;
83
84 async fn pre_start(
85 &self,
86 myself: ActorRef<Self::Msg>,
87 session: Self::Arguments,
88 ) -> Result<Self::State, ActorProcessingErr> {
89 myself.send_interval(HEARTBEAT_INTERVAL, || WsMessage::Hb);
90
91 Ok((Instant::now(), session))
92 }
93
94 async fn handle(
95 &self,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected