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

Method sock_accept

Lib/asyncio/selector_events.py:698–711  ·  view source on GitHub ↗

Accept a connection. The socket must be bound to an address and listening for connections. The return value is a pair (conn, address) where conn is a new socket object usable to send and receive data on the connection, and address is the address bound to the socket o

(self, sock)

Source from the content-addressed store, hash-verified

696 fut = None
697
698 async def sock_accept(self, sock):
699 """Accept a connection.
700
701 The socket must be bound to an address and listening for connections.
702 The return value is a pair (conn, address) where conn is a new socket
703 object usable to send and receive data on the connection, and address
704 is the address bound to the socket on the other end of the connection.
705 """
706 base_events._check_ssl_socket(sock)
707 if self._debug and sock.gettimeout() != 0:
708 raise ValueError("the socket must be non-blocking")
709 fut = self.create_future()
710 self._sock_accept(fut, sock)
711 return await fut
712
713 def _sock_accept(self, fut, sock):
714 fd = sock.fileno()

Callers

nothing calls this directly

Calls 3

_sock_acceptMethod · 0.95
gettimeoutMethod · 0.45
create_futureMethod · 0.45

Tested by

no test coverage detected