module Gio::DtlsConnection

Overview

#GDtlsConnection is the base DTLS connection class type, which wraps a #GDatagramBased and provides DTLS encryption on top of it. Its subclasses, #GDtlsClientConnection and #GDtlsServerConnection, implement client-side and server-side DTLS, respectively.

For TLS support, see #GTlsConnection.

As DTLS is datagram based, #GDtlsConnection implements #GDatagramBased, presenting a datagram-socket-like API for the encrypted connection. This operates over a base datagram connection, which is also a #GDatagramBased (#GDtlsConnection:base-socket).

To close a DTLS connection, use g_dtls_connection_close().

Neither #GDtlsServerConnection or #GDtlsClientConnection set the peer address on their base #GDatagramBased if it is a #GSocket — it is up to the caller to do that if they wish. If they do not, and g_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.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.g_type : UInt64 #

Instance Method Detail

def accept_certificate_signal #

def advertised_protocols : Enumerable(String) #

def advertised_protocols=(value : Enumerable(String)) : Enumerable(String) #

def advertised_protocols=(protocols : Enumerable(String)?) : Nil #

def base_socket : Gio::DatagramBased? #

def base_socket=(value : Gio::DatagramBased?) : Gio::DatagramBased? #

def certificate : Gio::TlsCertificate? #

def certificate=(certificate : Gio::TlsCertificate) : Nil #

def channel_binding_data(type : Gio::TlsChannelBindingType) : Bool #

def ciphersuite_name : String? #

def close(cancellable : Gio::Cancellable?) : Bool #

def close_async(io_priority : Int32, cancellable : Gio::Cancellable?, callback : Gio::AsyncReadyCallback?, user_data : Pointer(Void)?) : Nil #

def close_finish(result : Gio::AsyncResult) : Bool #

def database : Gio::TlsDatabase? #

def database=(database : Gio::TlsDatabase?) : Nil #

def emit_accept_certificate(peer_cert : Gio::TlsCertificate, errors : Gio::TlsCertificateFlags) : Bool #

def handshake(cancellable : Gio::Cancellable?) : Bool #

def handshake_async(io_priority : Int32, cancellable : Gio::Cancellable?, callback : Gio::AsyncReadyCallback?, user_data : Pointer(Void)?) : Nil #

def handshake_finish(result : Gio::AsyncResult) : Bool #

def interaction : Gio::TlsInteraction? #

def interaction=(interaction : Gio::TlsInteraction?) : Nil #

def negotiated_protocol : String? #

def peer_certificate : Gio::TlsCertificate? #

def peer_certificate_errors : Gio::TlsCertificateFlags #

def protocol_version : Gio::TlsProtocolVersion #

def rehandshake_mode : Gio::TlsRehandshakeMode #

def rehandshake_mode=(mode : Gio::TlsRehandshakeMode) : Nil #

def require_close_notify : Bool #

def require_close_notify=(require_close_notify : Bool) : Nil #

def require_close_notify? : Bool #

def shutdown(shutdown_read : Bool, shutdown_write : Bool, cancellable : Gio::Cancellable?) : Bool #

def shutdown_async(shutdown_read : Bool, shutdown_write : Bool, io_priority : Int32, cancellable : Gio::Cancellable?, callback : Gio::AsyncReadyCallback?, user_data : Pointer(Void)?) : Nil #

def shutdown_finish(result : Gio::AsyncResult) : Bool #

abstract def to_unsafe #