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

Function encode_frame

perro_source/api_modules/perro_networking/src/tcp.rs:271–282  ·  view source on GitHub ↗
(bytes: &[u8])

Source from the content-addressed store, hash-verified

269 NetErrorKind::FrameTooLarge,
270 "tcp frame queue exceeds max",
271 ));
272 }
273 if n < tmp.len() {
274 return Ok(());
275 }
276 }
277 Err(err) if err.kind() == io::ErrorKind::WouldBlock => return Ok(()),
278 Err(err) => return Err(NetError::from_io(NetErrorKind::Receive, err)),
279 }
280 }
281 }
282
283 /// Try to write all queued bytes without blocking.
284 ///
285 /// Returns `true` when the queue is empty.

Callers 2

write_frameMethod · 0.85

Calls 1

lenMethod · 0.45