MCPcopy Index your code
hub / github.com/RustPython/RustPython / send

Method send

crates/stdlib/src/socket.rs:1742–1754  ·  view source on GitHub ↗
(
            &self,
            bytes: ArgBytesLike,
            flags: OptionalArg<i32>,
            vm: &VirtualMachine,
        )

Source from the content-addressed store, hash-verified

1740
1741 #[pymethod]
1742 fn send(
1743 &self,
1744 bytes: ArgBytesLike,
1745 flags: OptionalArg<i32>,
1746 vm: &VirtualMachine,
1747 ) -> Result<usize, IoOrPyException> {
1748 let flags = flags.unwrap_or(0);
1749 let buf = bytes.borrow_buf();
1750 let buf = &*buf;
1751 self.sock_op(vm, SelectKind::Write, || {
1752 self.sock()?.send_with_flags(buf, flags)
1753 })
1754 }
1755
1756 #[pymethod]
1757 fn sendall(

Callers

nothing calls this directly

Calls 3

sock_opMethod · 0.80
sockMethod · 0.80
borrow_bufMethod · 0.45

Tested by

no test coverage detected