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

Function index

websockets/echo/src/main.rs:12–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10use self::server::{MyWebSocket, WsMessage};
11
12async fn index() -> impl Responder {
13 NamedFile::open("./static/index.html").unwrap()
14}
15
16/// WebSocket handshake and start `MyWebSocket` actor.
17async fn echo_ws(req: HttpRequest, stream: web::Payload) -> Result<HttpResponse, Error> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected