MCPcopy Index your code
hub / github.com/python/cpython / finish_accept

Method finish_accept

Lib/asyncio/windows_events.py:555–562  ·  view source on GitHub ↗
(trans, key, ov)

Source from the content-addressed store, hash-verified

553 ov.AcceptEx(listener.fileno(), conn.fileno())
554
555 def finish_accept(trans, key, ov):
556 ov.getresult()
557 # Use SO_UPDATE_ACCEPT_CONTEXT so getsockname() etc work.
558 buf = struct.pack('@P', listener.fileno())
559 conn.setsockopt(socket.SOL_SOCKET,
560 _overlapped.SO_UPDATE_ACCEPT_CONTEXT, buf)
561 conn.settimeout(listener.gettimeout())
562 return conn, conn.getpeername()
563
564 async def accept_coro(future, conn):
565 # Coroutine closing the accept socket if the future is cancelled

Callers

nothing calls this directly

Calls 7

getresultMethod · 0.45
packMethod · 0.45
filenoMethod · 0.45
setsockoptMethod · 0.45
settimeoutMethod · 0.45
gettimeoutMethod · 0.45
getpeernameMethod · 0.45

Tested by

no test coverage detected