MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / serve

Method serve

crates/openshell-server/src/multiplex.rs:139–144  ·  view source on GitHub ↗

Serve a connection, routing to gRPC or HTTP based on content-type.

(&self, stream: S)

Source from the content-addressed store, hash-verified

137
138 /// Serve a connection, routing to gRPC or HTTP based on content-type.
139 pub async fn serve<S>(&self, stream: S) -> Result<(), Box<dyn std::error::Error + Send + Sync>>
140 where
141 S: AsyncRead + AsyncWrite + Unpin + Send + 'static,
142 {
143 self.serve_with_peer_identity(stream, None).await
144 }
145
146 /// Serve a TLS connection with an optional mTLS peer identity.
147 pub async fn serve_with_peer_identity<S>(

Callers 4

spawn_gateway_connectionFunction · 0.80
handle_ws_tunnelFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 1

Tested by

no test coverage detected