Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Module « ssl » Python 3.11.3

Classe « SSLSocket »

Informations générales

Héritage

builtins.object
    socket
        socket
            SSLSocket

Définition

class SSLSocket(socket):

help(SSLSocket)

This class implements a subtype of socket.socket that wraps
    the underlying OS socket in an SSL context when necessary, and
    provides read and write methods over that channel. 

Constructeur(s)

Signature du constructeur Description
__init__(self, *args, **kwargs)

Liste des attributs statiques

Attributs statiques hérités de la classe socket

proto, timeout

Liste des attributs statiques

Attributs statiques hérités de la classe socket

family, type

Liste des propriétés

Nom de la propriétéDescription
contextThe SSLContext that is currently in use. [extrait de __doc__]
familyRead-only access to the address family for this socket. [extrait de __doc__]
sessionThe SSLSession for client socket. [extrait de __doc__]
session_reusedWas the client session reused during handshake [extrait de __doc__]
typeRead-only access to the socket type. [extrait de __doc__]

Liste des opérateurs

Opérateurs hérités de la classe object

__eq__, __ge__, __gt__, __le__, __lt__, __ne__

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
accept(self) Accepts a new connection from a remote client, and returns [extrait de accept.__doc__]
cipher(self) Return the currently selected cipher as a 3-tuple ``(name, [extrait de cipher.__doc__]
compression(self) Return the current compression algorithm in use, or ``None`` if [extrait de compression.__doc__]
connect(self, addr) Connects to remote ADDR, and then wraps the connection in [extrait de connect.__doc__]
connect_ex(self, addr) Connects to remote ADDR, and then wraps the connection in [extrait de connect_ex.__doc__]
do_handshake(self, block=False) Start the SSL/TLS handshake. [extrait de do_handshake.__doc__]
dup(self)
get_channel_binding(self, cb_type='tls-unique') Get channel binding data for current connection. Raise ValueError [extrait de get_channel_binding.__doc__]
getpeercert(self, binary_form=False) Returns a formatted version of the data in the certificate provided [extrait de getpeercert.__doc__]
pending(self) Return the number of bytes that can be read immediately. [extrait de pending.__doc__]
read(self, len=1024, buffer=None) Read up to LEN bytes and return them. [extrait de read.__doc__]
recv(self, buflen=1024, flags=0)
recv_into(self, buffer, nbytes=None, flags=0)
recvfrom(self, buflen=1024, flags=0)
recvfrom_into(self, buffer, nbytes=None, flags=0)
recvmsg(self, *args, **kwargs)
recvmsg_into(self, *args, **kwargs)
selected_alpn_protocol(self) Return the currently selected ALPN protocol as a string, or ``None`` [extrait de selected_alpn_protocol.__doc__]
selected_npn_protocol(self) Return the currently selected NPN protocol as a string, or ``None`` [extrait de selected_npn_protocol.__doc__]
send(self, data, flags=0)
sendall(self, data, flags=0)
sendfile(self, file, offset=0, count=None) Send a file, possibly by using os.sendfile() if this is a [extrait de sendfile.__doc__]
sendmsg(self, *args, **kwargs)
sendto(self, data, flags_or_addr, addr=None)
shared_ciphers(self) Return a list of ciphers shared by the client during the handshake or [extrait de shared_ciphers.__doc__]
shutdown(self, how)
unwrap(self) Start the SSL shutdown handshake. [extrait de unwrap.__doc__]
verify_client_post_handshake(self)
version(self) Return a string identifying the protocol version used by the [extrait de version.__doc__]
write(self, data) Write DATA to the underlying SSL channel. Returns [extrait de write.__doc__]

Méthodes héritées de la classe socket

__del__, __enter__, __exit__, __getattribute__, __getstate__, __init_subclass__, __repr__, __subclasshook__, bind, close, detach, fileno, get_inheritable, getblocking, getpeername, getsockname, getsockopt, gettimeout, listen, makefile, sendmsg_afalg, set_inheritable, setblocking, setsockopt, settimeout

Méthodes héritées de la classe socket

__del__, __getattribute__, __init_subclass__, __repr__, __subclasshook__, bind, close, detach, fileno, getblocking, getpeername, getsockname, getsockopt, gettimeout, listen, sendmsg_afalg, setblocking, setsockopt, settimeout

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __getstate__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__