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

Method _get_socket

tools/python-3.11.9-amd64/Lib/smtplib.py:305–313  ·  view source on GitHub ↗
(self, host, port, timeout)

Source from the content-addressed store, hash-verified

303 print(*args, file=sys.stderr)
304
305 def _get_socket(self, host, port, timeout):
306 # This makes it simpler for SMTP_SSL to use the SMTP connect code
307 # and just alter the socket connection bit.
308 if timeout is not None and not timeout:
309 raise ValueError('Non-blocking socket (timeout=0) is not supported')
310 if self.debuglevel > 0:
311 self._print_debug('connect: to', (host, port), self.source_address)
312 return socket.create_connection((host, port), timeout,
313 self.source_address)
314
315 def connect(self, host='localhost', port=0, source_address=None):
316 """Connect to a host on a given port.

Callers 2

connectMethod · 0.95
_get_socketMethod · 0.45

Calls 2

_print_debugMethod · 0.95
create_connectionMethod · 0.45

Tested by

no test coverage detected