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

Method bind

crates/stdlib/src/socket.rs:1622–1625  ·  view source on GitHub ↗
(&self, address: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1620
1621 #[pymethod]
1622 fn bind(&self, address: PyObjectRef, vm: &VirtualMachine) -> Result<(), IoOrPyException> {
1623 let sock_addr = self.extract_address(address, "bind", vm)?;
1624 Ok(self.sock()?.bind(&sock_addr)?)
1625 }
1626
1627 #[pymethod]
1628 fn listen(&self, backlog: OptionalArg<i32>) -> io::Result<()> {

Callers 2

slot_newMethod · 0.45
callMethod · 0.45

Calls 2

extract_addressMethod · 0.80
sockMethod · 0.80

Tested by

no test coverage detected