MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / send_full

Method send_full

tpm/src/socket.rs:90–103  ·  view source on GitHub ↗
(&self, buf: &[u8])

Source from the content-addressed store, hash-verified

88 }
89
90 pub fn send_full(&self, buf: &[u8]) -> Result<usize> {
91 let write_fd = self.write_msgfd;
92
93 let size = self
94 .stream
95 .as_ref()
96 .unwrap()
97 .send_with_fd(buf, write_fd)
98 .map_err(|e| {
99 Error::WriteToSocket(anyhow!("Failed to write to Socket. Error: {e:?}"))
100 })?;
101
102 Ok(size)
103 }
104
105 pub fn write(&mut self, buf: &[u8]) -> Result<usize> {
106 if self.stream.is_none() {

Callers 1

writeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected