GDtlsConnection

gio.dtls_connection.DtlsConnection is the base DTLS connection class type, which wraps a gio.datagram_based.DatagramBased and provides DTLS encryption on top of it. Its subclasses, gio.dtls_client_connection.DtlsClientConnection and gio.dtls_server_connection.DtlsServerConnection, implement client-side and server-side DTLS, respectively.

For TLS support, see gio.tls_connection.TlsConnection.

As DTLS is datagram based, gio.dtls_connection.DtlsConnection implements gio.datagram_based.DatagramBased, presenting a datagram-socket-like API for the encrypted connection. This operates over a base datagram connection, which is also a gio.datagram_based.DatagramBased (property@Gio.DtlsConnection:base-socket).

To close a DTLS connection, use gio.dtls_connection.DtlsConnection.close.

Neither gio.dtls_server_connection.DtlsServerConnection or gio.dtls_client_connection.DtlsClientConnection set the peer address on their base gio.datagram_based.DatagramBased if it is a gio.socket.Socket — it is up to the caller to do that if they wish. If they do not, and gio.socket.Socket.close is called on the base socket, the gio.dtls_connection.DtlsConnection will not raise a gio.types.IOErrorEnum.NotConnected error on further I/O.

struct GDtlsConnection