Skip to content

Gio.TlsServerConnection

interface

GTlsServerConnection is the server-side subclass of TlsConnection, representing a server-side TLS connection.

Static functions

new

@staticmethod
def new(base_io_stream: IOStream, certificate: TlsCertificate | None = ...) -> TlsServerConnection

Creates a new TlsServerConnection wrapping base_io_stream (which must have pollable input and output streams).

See the documentation for TlsConnection:base-io-stream for restrictions on when application code can run operations on the base_io_stream after this function has returned.

Parameters:

  • base_io_stream — the IOStream to wrap
  • certificate — the default server certificate, or None

Properties

authentication_mode

authentication_mode: TlsAuthenticationMode | int  # read/write

The TlsAuthenticationMode for the server. This can be changed before calling TlsConnection.handshake if you want to rehandshake with a different mode from the initial handshake.