On this page
  1. ssl.SSLSocket
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

ssl.SSLSocket

Prev: ssl.SSLSession | Up: ssl | Next: ssl.SSLSyscallError
Rel: ssl.AlertDescription, ssl.cert_time_to_seconds, ssl.CertificateError, ssl.create_connection
Ref: docs.python.org — ssl.SSLSocket
Tags: #public #python3 #stdlib #ssl


Import

import ssl
from ssl import SSLSocket

Signature & Overview

ssl.SSLSocket(*args, **kwargs)

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.

Methods & Attributes

Usage

import ssl

# Created by SSLContext.wrap_socket(raw_sock, server_hostname="...")
assert issubclass(ssl.SSLSocket, ssl.socket)

Gotchas

REPL Inspect

from ssl import SSLSocket
help(SSLSocket)

Linked from

Related notes