MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / handle_client

Function handle_client

crates/hyperqueue/src/server/client/mod.rs:63–78  ·  view source on GitHub ↗
(
    socket: TcpStream,
    server_dir: ServerDir,
    state_ref: StateRef,
    carrier: &Senders,
    end_flag: Arc<Notify>,
    key: Option<Arc<SecretKey>>,
)

Source from the content-addressed store, hash-verified

61}
62
63async fn handle_client(
64 socket: TcpStream,
65 server_dir: ServerDir,
66 state_ref: StateRef,
67 carrier: &Senders,
68 end_flag: Arc<Notify>,
69 key: Option<Arc<SecretKey>>,
70) -> crate::Result<()> {
71 log::debug!("New client connection");
72 let socket = accept_client(socket, key).await?;
73 let (tx, rx) = socket.split();
74
75 client_rpc_loop(tx, rx, server_dir, state_ref, carrier, end_flag).await;
76 log::debug!("Client connection ended");
77 Ok(())
78}
79
80async fn stream_history_events<Tx: Sink<ToClientMessage, Error = tako::Error> + Unpin + 'static>(
81 tx: &mut Tx,

Callers 1

Calls 3

accept_clientFunction · 0.85
client_rpc_loopFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected