OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, socket, ssl_context, server_hostname=None, suppress_ragged_eofs=True) |
def | __enter__ (self) |
def | __exit__ (self, *_) |
def | fileno (self) |
def | read (self, len=1024, buffer=None) |
def | recv (self, len=1024, flags=0) |
def | recv_into (self, buffer, nbytes=None, flags=0) |
def | sendall (self, data, flags=0) |
def | send (self, data, flags=0) |
def | makefile (self, mode="r", buffering=None, encoding=None, errors=None, newline=None) |
def | unwrap (self) |
def | close (self) |
def | getpeercert (self, binary_form=False) |
def | version (self) |
def | cipher (self) |
def | selected_alpn_protocol (self) |
def | selected_npn_protocol (self) |
def | shared_ciphers (self) |
def | compression (self) |
def | settimeout (self, value) |
def | gettimeout (self) |
Data Fields | |
incoming | |
outgoing | |
suppress_ragged_eofs | |
socket | |
sslobj | |
The SSLTransport wraps an existing socket and establishes an SSL connection. Contrary to Python's implementation of SSLSocket, it allows you to chain multiple TLS connections together. It's particularly useful if you need to implement TLS within TLS. The class supports most of the socket API operations.
def __init__ | ( | self, | |
socket, | |||
ssl_context, | |||
server_hostname = None , |
|||
suppress_ragged_eofs = True |
|||
) |
Create an SSLTransport around socket using the provided ssl_context.
def __enter__ | ( | self | ) |
def __exit__ | ( | self, | |
* | _ | ||
) |
def cipher | ( | self | ) |
def close | ( | self | ) |
def compression | ( | self | ) |
def fileno | ( | self | ) |
def getpeercert | ( | self, | |
binary_form = False |
|||
) |
def gettimeout | ( | self | ) |
def makefile | ( | self, | |
mode = "r" , |
|||
buffering = None , |
|||
encoding = None , |
|||
errors = None , |
|||
newline = None |
|||
) |
Python's httpclient uses makefile and buffered io when reading HTTP messages and we need to support it. This is unfortunately a copy and paste of socket.py makefile with small changes to point to the socket directly.
def read | ( | self, | |
len = 1024 , |
|||
buffer = None |
|||
) |
def recv | ( | self, | |
len = 1024 , |
|||
flags = 0 |
|||
) |
def recv_into | ( | self, | |
buffer, | |||
nbytes = None , |
|||
flags = 0 |
|||
) |
def selected_alpn_protocol | ( | self | ) |
def selected_npn_protocol | ( | self | ) |
def send | ( | self, | |
data, | |||
flags = 0 |
|||
) |
def sendall | ( | self, | |
data, | |||
flags = 0 |
|||
) |
def settimeout | ( | self, | |
value | |||
) |
def shared_ciphers | ( | self | ) |
def unwrap | ( | self | ) |
def version | ( | self | ) |
incoming |
outgoing |
socket |
sslobj |
suppress_ragged_eofs |