MCPcopy Create free account
hub / github.com/PerroEngine/Perro / send_binary

Method send_binary

perro_source/api_modules/perro_networking/src/websocket.rs:347–351  ·  view source on GitHub ↗
(&mut self, bytes: Vec<u8>)

Source from the content-addressed store, hash-verified

345 }
346
347 pub fn send_binary(&mut self, bytes: Vec<u8>) -> NetResult<()> {
348 self.socket
349 .send(Message::binary(bytes))
350 .map_err(|err| NetError::new(NetErrorKind::Send, err.to_string()))
351 }
352
353 pub fn send_compressed_text(&mut self, text: impl Into<String>) -> NetResult<()> {
354 let mut bytes = WEBSOCKET_ZLIB_TEXT_PREFIX.to_vec();

Calls 4

spawn_net_blockingFunction · 0.85
lock_websocketFunction · 0.85
sendMethod · 0.80
cloneMethod · 0.80