module Gio::DtlsConnection
Overview
GDtlsConnection
is the base DTLS connection class type, which wraps
a Gio::DatagramBased
and provides DTLS encryption on top of it. Its
subclasses, Gio::DtlsClientConnection
and
Gio::DtlsServerConnection
, implement client-side and server-side DTLS,
respectively.
For TLS support, see Gio::TlsConnection
.
As DTLS is datagram based, GDtlsConnection
implements
Gio::DatagramBased
, presenting a datagram-socket-like API for the
encrypted connection. This operates over a base datagram connection, which is
also a GDatagramBased
([property@Gio.DtlsConnection:base-socket]).
To close a DTLS connection, use Gio::DtlsConnection#close
.
Neither Gio::DtlsServerConnection
or Gio::DtlsClientConnection
set the peer address on their base Gio::DatagramBased
if it is a
Gio::Socket
— it is up to the caller to do that if they wish. If they
do not, and Gio::Socket#close
is called on the base socket, the
GDtlsConnection
will not raise a G_IO_ERROR_NOT_CONNECTED
error on
further I/O.
Defined in:
lib/gi-crystal/src/auto/gio-2.0/dtls_connection.crConstructors
-
.cast(obj : GObject::Object) : self
Cast a
GObject::Object
toself
, throws aTypeCastError
if the cast can't be made.
Class Method Summary
Instance Method Summary
- #accept_certificate_signal
- #advertised_protocols : Enumerable(String)
- #advertised_protocols=(value : Enumerable(String)) : Enumerable(String)
- #advertised_protocols=(protocols : Enumerable(String) | Nil) : Nil
- #base_socket : Gio::DatagramBased | Nil
- #base_socket=(value : Gio::DatagramBased | Nil) : Gio::DatagramBased | Nil
- #certificate : Gio::TlsCertificate | Nil
- #certificate=(certificate : Gio::TlsCertificate) : Nil
- #channel_binding_data(type : Gio::TlsChannelBindingType) : Bool
- #ciphersuite_name : String | Nil
-
#ciphersuite_name? : String | Nil
Same as
#ciphersuite_name
, but can return nil. - #close(cancellable : Gio::Cancellable | Nil) : Bool
- #close_async(io_priority : Int32, cancellable : Gio::Cancellable | Nil, &callback : Gio::AsyncReadyCallback) : Nil
- #close_finish(result : Gio::AsyncResult) : Bool
- #database : Gio::TlsDatabase | Nil
- #database=(database : Gio::TlsDatabase | Nil) : Nil
- #emit_accept_certificate(peer_cert : Gio::TlsCertificate, errors : Gio::TlsCertificateFlags) : Bool
- #handshake(cancellable : Gio::Cancellable | Nil) : Bool
- #handshake_async(io_priority : Int32, cancellable : Gio::Cancellable | Nil, &callback : Gio::AsyncReadyCallback) : Nil
- #handshake_finish(result : Gio::AsyncResult) : Bool
- #interaction : Gio::TlsInteraction | Nil
- #interaction=(interaction : Gio::TlsInteraction | Nil) : Nil
- #negotiated_protocol : String | Nil
-
#negotiated_protocol? : String | Nil
Same as
#negotiated_protocol
, but can return nil. - #peer_certificate : Gio::TlsCertificate | Nil
- #peer_certificate_errors : Gio::TlsCertificateFlags
- #protocol_version : Gio::TlsProtocolVersion
-
#rehandshake_mode : Gio::TlsRehandshakeMode
DEPRECATED
-
#rehandshake_mode=(mode : Gio::TlsRehandshakeMode) : Nil
DEPRECATED
- #require_close_notify : Bool
- #require_close_notify=(require_close_notify : Bool) : Nil
- #require_close_notify? : Bool
- #shutdown(shutdown_read : Bool, shutdown_write : Bool, cancellable : Gio::Cancellable | Nil) : Bool
- #shutdown_async(shutdown_read : Bool, shutdown_write : Bool, io_priority : Int32, cancellable : Gio::Cancellable | Nil, &callback : Gio::AsyncReadyCallback) : Nil
- #shutdown_finish(result : Gio::AsyncResult) : Bool
- #to_unsafe