MCPcopy
hub / github.com/mitmproxy/mitmproxy / recv

Method recv

mitmproxy/platform/windows.py:300–311  ·  view source on GitHub ↗

Convenience function that receives a packet from the passed handler and handles error codes. If the process has been shut down, None is returned.

(self)

Source from the content-addressed store, hash-verified

298 self.windivert.close()
299
300 def recv(self) -> pydivert.Packet | None:
301 """
302 Convenience function that receives a packet from the passed handler and handles error codes.
303 If the process has been shut down, None is returned.
304 """
305 try:
306 return self.windivert.recv()
307 except OSError as e:
308 if e.winerror == 995: # type: ignore
309 return None
310 else:
311 raise
312
313
314class RedirectLocal(Redirect):

Callers 4

handleMethod · 0.80
receive_dataMethod · 0.80
runMethod · 0.80
is_supported_versionFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected