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

Method poll_handshake

perro_source/api_modules/perro_networking/src/tcp.rs:199–204  ·  view source on GitHub ↗
(&mut self, max_frame_bytes: usize)

Source from the content-addressed store, hash-verified

197
198 pub fn write_handshake(&mut self, handshake: &NetHandshake) -> NetResult<()> {
199 self.write_frame(&handshake.encode()?)
200 }
201
202 pub fn poll_frame(&mut self, max_frame_bytes: usize) -> NetResult<Option<Vec<u8>>> {
203 self.flush_pending()?;
204 if let Some(frame) = decode_next_queued_frame(&mut self.frame_buf, max_frame_bytes)? {
205 return Ok(Some(frame));
206 }
207 self.read_into_frame_buf(max_frame_bytes)?;

Callers

nothing calls this directly

Calls 1

poll_frameMethod · 0.80

Tested by

no test coverage detected