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

Method finish_request

Lib/test/test_asyncio/utils.py:144–158  ·  view source on GitHub ↗
(self, request, client_address)

Source from the content-addressed store, hash-verified

142class SSLWSGIServerMixin:
143
144 def finish_request(self, request, client_address):
145 # The relative location of our test directory (which
146 # contains the ssl key and certificate files) differs
147 # between the stdlib and stand-alone asyncio.
148 # Prefer our own if we can find it.
149 context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
150 context.load_cert_chain(ONLYCERT, ONLYKEY)
151
152 ssock = context.wrap_socket(request, server_side=True)
153 try:
154 self.RequestHandlerClass(ssock, client_address, self)
155 ssock.close()
156 except OSError:
157 # maybe socket has been closed by peer
158 pass
159
160
161class SSLWSGIServer(SSLWSGIServerMixin, SilentWSGIServer):

Callers 1

run_amockFunction · 0.45

Calls 2

wrap_socketMethod · 0.95
closeMethod · 0.45

Tested by 1

run_amockFunction · 0.36