Lines Matching refs:port

229     def __init__(self, host='', port=0, local_hostname=None,
235 connect. If specified, `port` specifies the port to which to connect.
242 port) for the socket to bind to as its source address before
243 connecting. If the host is '' and port is 0, the OS default behavior
255 (code, msg) = self.connect(host, port)
305 def _get_socket(self, host, port, timeout):
311 self._print_debug('connect: to', (host, port), self.source_address)
312 return socket.create_connection((host, port), timeout,
315 def connect(self, host='localhost', port=0, source_address=None):
316 """Connect to a host on a given port.
319 there is no port specified, that suffix will be stripped off and the
320 number interpreted as the port number to use.
330 if not port and (host.find(':') == host.rfind(':')):
333 host, port = host[:i], host[i + 1:]
335 port = int(port)
337 raise OSError("nonnumeric port")
338 if not port:
339 port = self.default_port
340 sys.audit("smtplib.connect", self, host, port)
341 self.sock = self._get_socket(host, port, self.timeout)
1018 host) is used. If port is omitted, the standard SMTP-over-SSL port
1030 def __init__(self, host='', port=0, local_hostname=None,
1050 SMTP.__init__(self, host, port, local_hostname, timeout,
1053 def _get_socket(self, host, port, timeout):
1055 self._print_debug('connect:', (host, port))
1056 new_socket = super()._get_socket(host, port, timeout)
1074 host:port server. local_hostname and source_address have the same
1084 def __init__(self, host='', port=LMTP_PORT, local_hostname=None,
1087 super().__init__(host, port, local_hostname=local_hostname,
1090 def connect(self, host='localhost', port=0, source_address=None):
1093 return super().connect(host, port, source_address=source_address)