From 039f1846543c18810a65bfd0e52c0cdcd46cad08 Mon Sep 17 00:00:00 2001 From: R David Murray Date: Wed, 7 Sep 2016 14:09:51 -0400 Subject: #26209: Clarify type of *localaddr*/*remoteadr* in smtpd docs. --- Doc/library/smtpd.rst | 7 ++++--- Doc/library/socket.rst | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Doc/library/smtpd.rst b/Doc/library/smtpd.rst index ebb0b30..7d6534b 100644 --- a/Doc/library/smtpd.rst +++ b/Doc/library/smtpd.rst @@ -23,9 +23,10 @@ SMTPServer Objects .. class:: SMTPServer(localaddr, remoteaddr) Create a new :class:`SMTPServer` object, which binds to local address - *localaddr*. It will treat *remoteaddr* as an upstream SMTP relayer. It - inherits from :class:`asyncore.dispatcher`, and so will insert itself into - :mod:`asyncore`'s event loop on instantiation. + *localaddr*. It will treat *remoteaddr* as an upstream SMTP relayer. Both + *localaddr* and *remoteaddr* should be a :ref:`(host, port) ` + tuple. The object inherits from :class:`asyncore.dispatcher`, and so will + insert itself into :mod:`asyncore`'s event loop on instantiation. .. method:: process_message(peer, mailfrom, rcpttos, data) diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 73b5d5c..aff6a2e 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -34,6 +34,8 @@ in the C interface: as with :meth:`read` and :meth:`write` operations on Python files, buffer allocation on receive operations is automatic, and buffer length is implicit on send operations. +.. _host_port: + Socket addresses are represented as follows: A single string is used for the :const:`AF_UNIX` address family. A pair ``(host, port)`` is used for the :const:`AF_INET` address family, where *host* is a string representing either a -- cgit v0.12