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

Method _handle_request_noblock

Lib/socketserver.py:302–323  ·  view source on GitHub ↗

Handle one request, without blocking. I assume that selector.select() has returned that the socket is readable before this function was called, so there should be no risk of blocking in get_request().

(self)

Source from the content-addressed store, hash-verified

300 return self.handle_timeout()
301
302 def _handle_request_noblock(self):
303 """Handle one request, without blocking.
304
305 I assume that selector.select() has returned that the socket is
306 readable before this function was called, so there should be no risk of
307 blocking in get_request().
308 """
309 try:
310 request, client_address = self.get_request()
311 except OSError:
312 return
313 if self.verify_request(request, client_address):
314 try:
315 self.process_request(request, client_address)
316 except Exception:
317 self.handle_error(request, client_address)
318 self.shutdown_request(request)
319 except:
320 self.shutdown_request(request)
321 raise
322 else:
323 self.shutdown_request(request)
324
325 def handle_timeout(self):
326 """Called if no new request arrives within self.timeout.

Callers 2

serve_foreverMethod · 0.95
handle_requestMethod · 0.95

Calls 5

verify_requestMethod · 0.95
process_requestMethod · 0.95
handle_errorMethod · 0.95
shutdown_requestMethod · 0.95
get_requestMethod · 0.45

Tested by

no test coverage detected