Skip to main content

handle_connection_loop

Function handle_connection_loop 

Source
pub async fn handle_connection_loop<S>(
    stream: &mut S,
    graph: &Arc<Mutex<GraphStore>>,
    rate_limiter: &Arc<Mutex<RateLimiter>>,
    config: &ServerConfig,
) -> Result<()>
where S: AsyncRead + AsyncWrite + Unpin,
Expand description

Handle a persistent connection that may carry multiple messages.

Loops reading messages from the stream until the remote side disconnects or an unrecoverable error occurs. Keepalive probes are silently handled. This is used by the onion service accept loop for long-lived connections.