Package org.gnome.gio

Interface DtlsConnection

All Superinterfaces:
DatagramBased, Proxy
All Known Subinterfaces:
DtlsClientConnection, DtlsServerConnection
All Known Implementing Classes:
DtlsClientConnection.DtlsClientConnectionImpl, DtlsConnection.DtlsConnectionImpl, DtlsServerConnection.DtlsServerConnectionImpl

@Generated("io.github.jwharm.JavaGI") public interface DtlsConnection extends Proxy, DatagramBased
GDtlsConnection is the base DTLS connection class type, which wraps a DatagramBased and provides DTLS encryption on top of it. Its subclasses, DtlsClientConnection and DtlsServerConnection, implement client-side and server-side DTLS, respectively.

For TLS support, see TlsConnection.

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

To close a DTLS connection, use close(org.gnome.gio.Cancellable).

Neither DtlsServerConnection or DtlsClientConnection set the peer address on their base DatagramBased if it is a Socket — it is up to the caller to do that if they wish. If they do not, and Socket.close() is called on the base socket, the GDtlsConnection will not raise a G_IO_ERROR_NOT_CONNECTED error on further I/O.