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

Method open

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

Setup connection to remote server on "host:port" (default: localhost:standard IMAP4 port). This connection will be used by the routines: read, readline, send, shutdown.

(self, host='', port=IMAP4_PORT, timeout=None)

Source from the content-addressed store, hash-verified

302 return socket.create_connection(address)
303
304 def open(self, host='', port=IMAP4_PORT, timeout=None):
305 """Setup connection to remote server on "host:port"
306 (default: localhost:standard IMAP4 port).
307 This connection will be used by the routines:
308 read, readline, send, shutdown.
309 """
310 self.host = host
311 self.port = port
312 self.sock = self._create_socket(timeout)
313 self.file = self.sock.makefile('rb')
314
315
316 def read(self, size):

Callers 2

__init__Method · 0.95
openMethod · 0.45

Calls 2

_create_socketMethod · 0.95
makefileMethod · 0.45

Tested by

no test coverage detected