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)
| 699 | fut = None |
| 700 | |
| 701 | async def sock_accept(self, sock): |
| 702 | """Accept a connection. |
| 703 | |
| 704 | The socket must be bound to an address and listening for connections. |
| 705 | The return value is a pair (conn, address) where conn is a new socket |
| 706 | object usable to send and receive data on the connection, and address |
| 707 | is the address bound to the socket on the other end of the connection. |
| 708 | """ |
| 709 | base_events._check_ssl_socket(sock) |
| 710 | if self._debug and sock.gettimeout() != 0: |
| 711 | raise ValueError("the socket must be non-blocking") |
| 712 | fut = self.create_future() |
| 713 | self._sock_accept(fut, sock) |
| 714 | return await fut |
| 715 | |
| 716 | def _sock_accept(self, fut, sock): |
| 717 | fd = sock.fileno() |
nothing calls this directly
no test coverage detected