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)
| 305 | return socket.create_connection(address) |
| 306 | |
| 307 | def open(self, host='', port=IMAP4_PORT, timeout=None): |
| 308 | """Setup connection to remote server on "host:port" |
| 309 | (default: localhost:standard IMAP4 port). |
| 310 | This connection will be used by the routines: |
| 311 | read, readline, send, shutdown. |
| 312 | """ |
| 313 | self.host = host |
| 314 | self.port = port |
| 315 | self.sock = self._create_socket(timeout) |
| 316 | self._file = self.sock.makefile('rb') |
| 317 | |
| 318 | |
| 319 | @property |