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)
| 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() |
nothing calls this directly
no test coverage detected