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

Class ConnectionInfo

https-tls/rustls-client-cert/src/main.rs:24–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22#[allow(dead_code)] // it is debug printed
23#[derive(Debug, Clone)]
24struct ConnectionInfo {
25 bind: SocketAddr,
26 peer: SocketAddr,
27 ttl: Option<u32>,
28}
29
30async fn route_whoami(req: HttpRequest) -> impl Responder {
31 let conn_info = req.conn_data::<ConnectionInfo>().unwrap();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected