MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / shutdown

Method shutdown

tools/python-3.11.9-amd64/Lib/imaplib.py:335–348  ·  view source on GitHub ↗

Close I/O established in "open".

(self)

Source from the content-addressed store, hash-verified

333
334
335 def shutdown(self):
336 """Close I/O established in "open"."""
337 self.file.close()
338 try:
339 self.sock.shutdown(socket.SHUT_RDWR)
340 except OSError as exc:
341 # The server might already have closed the connection.
342 # On Windows, this may result in WSAEINVAL (error 10022):
343 # An invalid operation was attempted.
344 if (exc.errno != errno.ENOTCONN
345 and getattr(exc, 'winerror', 0) != 10022):
346 raise
347 finally:
348 self.sock.close()
349
350
351 def socket(self):

Callers 5

__init__Method · 0.95
logoutMethod · 0.95
demoserver.pyFile · 0.45
closeMethod · 0.45
mainFunction · 0.45

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected