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

Method handle

websockets/echo/src/server.rs:94–111  ·  view source on GitHub ↗
(
        &self,
        myself: ActorRef<Self::Msg>,
        message: Self::Msg,
        state: &mut Self::State,
    )

Source from the content-addressed store, hash-verified

92 }
93
94 async fn handle(
95 &self,
96 myself: ActorRef<Self::Msg>,
97 message: Self::Msg,
98 state: &mut Self::State,
99 ) -> Result<(), ActorProcessingErr> {
100 match message {
101 WsMessage::Hb => {
102 self.handle_hb(state, &myself).await?;
103 }
104
105 WsMessage::Ws(msg) => {
106 self.handle_ws_msg(msg, state, myself).await?;
107 }
108 }
109
110 Ok(())
111 }
112}

Callers 5

run_appFunction · 0.45
mainFunction · 0.45
gen_tls_certFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 2

handle_hbMethod · 0.80
handle_ws_msgMethod · 0.80

Tested by

no test coverage detected