[Python-checkins] cpython (2.7): #17641: 2.X / 3.X ssl doc unification

giampaolo.rodola python-checkins at python.org
Sat Apr 6 03:46:57 CEST 2013


http://hg.python.org/cpython/rev/03c65fc349c0
changeset:   83115:03c65fc349c0
branch:      2.7
parent:      83111:b891bf435f69
user:        Giampaolo Rodola' <g.rodola at gmail.com>
date:        Sat Apr 06 03:46:47 2013 +0200
summary:
  #17641: 2.X / 3.X ssl doc unification

files:
  Doc/library/ssl.rst |  26 +++++++++++++++++++++-----
  1 files changed, 21 insertions(+), 5 deletions(-)


diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst
--- a/Doc/library/ssl.rst
+++ b/Doc/library/ssl.rst
@@ -298,14 +298,30 @@
 SSLSocket Objects
 -----------------
 
-.. method:: SSLSocket.read([nbytes=1024])
+SSL sockets provide the following methods of :ref:`socket-objects`:
 
-   Reads up to ``nbytes`` bytes from the SSL-encrypted channel and returns them.
+- :meth:`~socket.socket.accept()`
+- :meth:`~socket.socket.bind()`
+- :meth:`~socket.socket.close()`
+- :meth:`~socket.socket.connect()`
+- :meth:`~socket.socket.fileno()`
+- :meth:`~socket.socket.getpeername()`, :meth:`~socket.socket.getsockname()`
+- :meth:`~socket.socket.getsockopt()`, :meth:`~socket.socket.setsockopt()`
+- :meth:`~socket.socket.gettimeout()`, :meth:`~socket.socket.settimeout()`,
+  :meth:`~socket.socket.setblocking()`
+- :meth:`~socket.socket.listen()`
+- :meth:`~socket.socket.makefile()`
+- :meth:`~socket.socket.recv()`, :meth:`~socket.socket.recv_into()`
+  (but passing a non-zero ``flags`` argument is not allowed)
+- :meth:`~socket.socket.send()`, :meth:`~socket.socket.sendall()` (with
+  the same limitation)
+- :meth:`~socket.socket.shutdown()`
 
-.. method:: SSLSocket.write(data)
+However, since the SSL (and TLS) protocol has its own framing atop
+of TCP, the SSL sockets abstraction can, in certain respects, diverge from
+the specification of normal, OS-level sockets.
 
-   Writes the ``data`` to the other side of the connection, using the SSL
-   channel to encrypt.  Returns the number of bytes written.
+SSL sockets also have the following additional methods and attributes:
 
 .. method:: SSLSocket.getpeercert(binary_form=False)
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list