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

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.cast(obj : GObject::Object) : self #

Cast a GObject::Object to self, throws a TypeCastError if the cast can't be made.


[View source]

Class Method Detail

def self.cast?(obj : GObject::Object) : self | Nil #

[View source]
def self.g_type : UInt64 #

[View source]

Instance Method Detail

def accept_certificate_signal #

[View source]
def advertised_protocols : Enumerable(String) #

[View source]
def advertised_protocols=(value : Enumerable(String)) : Enumerable(String) #

[View source]
def advertised_protocols=(protocols : Enumerable(String) | Nil) : Nil #

[View source]
def base_socket : Gio::DatagramBased | Nil #

[View source]
def base_socket=(value : Gio::DatagramBased | Nil) : Gio::DatagramBased | Nil #

[View source]
def certificate : Gio::TlsCertificate | Nil #

[View source]
def certificate=(certificate : Gio::TlsCertificate) : Nil #

[View source]
def channel_binding_data(type : Gio::TlsChannelBindingType) : Bool #

[View source]
def ciphersuite_name : String | Nil #

[View source]
def close(cancellable : Gio::Cancellable | Nil) : Bool #

[View source]
def close_async(io_priority : Int32, cancellable : Gio::Cancellable | Nil, callback : Gio::AsyncReadyCallback | Nil, user_data : Pointer(Void) | Nil) : Nil #

[View source]
def close_finish(result : Gio::AsyncResult) : Bool #

[View source]
def database : Gio::TlsDatabase | Nil #

[View source]
def database=(database : Gio::TlsDatabase | Nil) : Nil #

[View source]
def emit_accept_certificate(peer_cert : Gio::TlsCertificate, errors : Gio::TlsCertificateFlags) : Bool #

[View source]
def handshake(cancellable : Gio::Cancellable | Nil) : Bool #

[View source]
def handshake_async(io_priority : Int32, cancellable : Gio::Cancellable | Nil, callback : Gio::AsyncReadyCallback | Nil, user_data : Pointer(Void) | Nil) : Nil #

[View source]
def handshake_finish(result : Gio::AsyncResult) : Bool #

[View source]
def interaction : Gio::TlsInteraction | Nil #

[View source]
def interaction=(interaction : Gio::TlsInteraction | Nil) : Nil #

[View source]
def negotiated_protocol : String | Nil #

[View source]
def peer_certificate : Gio::TlsCertificate | Nil #

[View source]
def peer_certificate_errors : Gio::TlsCertificateFlags #

[View source]
def protocol_version : Gio::TlsProtocolVersion #

[View source]
def rehandshake_mode : Gio::TlsRehandshakeMode #

DEPRECATED


[View source]
def rehandshake_mode=(mode : Gio::TlsRehandshakeMode) : Nil #

DEPRECATED


[View source]
def require_close_notify : Bool #

[View source]
def require_close_notify=(require_close_notify : Bool) : Nil #

[View source]
def require_close_notify? : Bool #

[View source]
def shutdown(shutdown_read : Bool, shutdown_write : Bool, cancellable : Gio::Cancellable | Nil) : Bool #

[View source]
def shutdown_async(shutdown_read : Bool, shutdown_write : Bool, io_priority : Int32, cancellable : Gio::Cancellable | Nil, callback : Gio::AsyncReadyCallback | Nil, user_data : Pointer(Void) | Nil) : Nil #

[View source]
def shutdown_finish(result : Gio::AsyncResult) : Bool #

[View source]
abstract def to_unsafe #

[View source]