MCPcopy Create free account
hub / github.com/Recordscript/recordscript / send_raw

Method send_raw

libs/hbb_common/src/tcp.rs:157–164  ·  view source on GitHub ↗
(&mut self, msg: Vec<u8>)

Source from the content-addressed store, hash-verified

155
156 #[inline]
157 pub async fn send_raw(&mut self, msg: Vec<u8>) -> ResultType<()> {
158 let mut msg = msg;
159 if let Some(key) = self.2.as_mut() {
160 msg = key.enc(&msg);
161 }
162 self.send_bytes(bytes::Bytes::from(msg)).await?;
163 Ok(())
164 }
165
166 #[inline]
167 pub async fn send_bytes(&mut self, bytes: Bytes) -> ResultType<()> {

Callers 1

sendMethod · 0.45

Calls 2

encMethod · 0.80
send_bytesMethod · 0.80

Tested by

no test coverage detected