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

Function close_payload

crates/openshell-supervisor-network/src/l7/websocket.rs:1211–1216  ·  view source on GitHub ↗
(code: u16, reason: &[u8])

Source from the content-addressed store, hash-verified

1209 }
1210
1211 fn close_payload(code: u16, reason: &[u8]) -> Vec<u8> {
1212 let mut payload = Vec::with_capacity(2 + reason.len());
1213 payload.extend_from_slice(&code.to_be_bytes());
1214 payload.extend_from_slice(reason);
1215 payload
1216 }
1217
1218 async fn run_client_to_server(input: Vec<u8>) -> Result<Vec<u8>> {
1219 let (_, resolver) = resolver();

Calls 1

lenMethod · 0.80

Tested by

no test coverage detected