]> granicus.if.org Git - python/commitdiff
Merge 3.4
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 10 Oct 2014 10:43:17 +0000 (12:43 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 10 Oct 2014 10:43:17 +0000 (12:43 +0200)
1  2 
Doc/library/ssl.rst

index e8f8658d0257098e0d831f372cb53a1d1bf6ae5b,6489ecfc25793a4583269e566903b67b7651d36c..b5195f6e0ed1e9edcb1d19f135c597f77faabd1b
@@@ -771,36 -755,36 +771,42 @@@ Constant
  SSL Sockets
  -----------
  
- SSL sockets provide the following methods of :ref:`socket-objects`:
- - :meth:`~socket.socket.accept()`
- - :meth:`~socket.socket.bind()`
- - :meth:`~socket.socket.close()`
- - :meth:`~socket.socket.connect()`
- - :meth:`~socket.socket.detach()`
- - :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.sendfile()` (but :mod:`os.sendfile` will be used
-   for plain-text sockets only, else :meth:`~socket.socket.send()` will be used)
-      .. versionadded:: 3.5
- - :meth:`~socket.socket.shutdown()`
- 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.  See especially the
- :ref:`notes on non-blocking sockets <ssl-nonblocking>`.
+ .. class:: SSLSocket(socket.socket)
+    SSL sockets provide the following methods of :ref:`socket-objects`:
+    - :meth:`~socket.socket.accept()`
+    - :meth:`~socket.socket.bind()`
+    - :meth:`~socket.socket.close()`
+    - :meth:`~socket.socket.connect()`
+    - :meth:`~socket.socket.detach()`
+    - :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.sendfile()` (but :mod:`os.sendfile` will be used
++     for plain-text sockets only, else :meth:`~socket.socket.send()` will be used)
+    - :meth:`~socket.socket.shutdown()`
+    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.  See especially the
+    :ref:`notes on non-blocking sockets <ssl-nonblocking>`.
+    Usually, :class:`SSLSocket` are not created directly, but using the
+    :func:`wrap_socket` function or the :meth:`SSLContext.wrap_socket` method.
++   .. versionchanged:: 3.5
++      The :meth:`sendfile` method was added.
++
 +
  SSL sockets also have the following additional methods and attributes:
  
  .. method:: SSLSocket.read(len=0, buffer=None)