docs/usocket: Deconditionalize.

Notes on WiPy incompatibilities with the standard socket module API are
moved under "Known issues" to its documentation.
pull/2922/head
Paul Sokolovsky 2017-04-09 00:48:28 +03:00
rodzic 3acace588a
commit 2e58474580
2 zmienionych plików z 14 dodań i 12 usunięć

Wyświetl plik

@ -41,18 +41,6 @@ Functions
Create a new socket using the given address family, socket type and protocol number.
.. only:: port_wipy
.. note::
SSL sockets need to be created the following way before wrapping them with
``ssl.wrap_socket``::
import socket
import ssl
s = socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_SEC)
ss = ssl.wrap_socket(s)
.. function:: socket.getaddrinfo(host, port)
Translate the host/port argument into a sequence of 5-tuples that contain all the

Wyświetl plik

@ -239,3 +239,17 @@ Additional Pin methods:
Returns a list of the alternate functions supported by the pin. List items are
a tuple of the form: ``('ALT_FUN_NAME', ALT_FUN_INDEX)``
Known issues
------------
Incompatible way to create SSL sockets
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SSL sockets need to be created the following way before wrapping them with.
``ssl.wrap_socket``::
import socket
import ssl
s = socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_SEC)
ss = ssl.wrap_socket(s)