Class DtlsClientConnection

All Implemented Interfaces:
PointerInterface

public class DtlsClientConnection extends Interface
#GDtlsClientConnection is the client-side subclass of
#GDtlsConnection, representing a client-side DTLS connection.

https://docs.gtk.org/gio/iface.DtlsClientConnection.html

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getAcceptedCas

      public List getAcceptedCas()
      Gets the list of distinguished names of the Certificate Authorities
      that the server will accept certificates from. This will be set
      during the TLS handshake if the server requests a certificate.
      Otherwise, it will be %NULL.

      Each item in the list is a #GByteArray which contains the complete
      subject DN of the certificate authority.
      Returns:
      the list of CA DNs. You should unref each element with g_byte_array_unref() and then the free the list with g_list_free().
    • getServerIdentity

      public SocketConnectable getServerIdentity()
      Gets @conn's expected server identity
      Returns:
      a #GSocketConnectable describing the expected server identity, or %NULL if the expected identity is not known.
    • setServerIdentity

      public void setServerIdentity(@Nonnull SocketConnectable identity)
      Sets @conn's expected server identity, which is used both to tell
      servers on virtual hosts which certificate to present, and also
      to let @conn know what name to look for in the certificate when
      performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.
      Parameters:
      identity - a #GSocketConnectable describing the expected server identity
    • _new

      public static DtlsClientConnection _new(@Nonnull DatagramBased base_socket, @Nullable SocketConnectable server_identity) throws AllocationError
      Creates a new #GDtlsClientConnection wrapping @base_socket which is
      assumed to communicate with the server identified by @server_identity.
      Parameters:
      base_socket - the #GDatagramBased to wrap
      server_identity - the expected identity of the server
      Returns:
      the new #GDtlsClientConnection, or %NULL on error
      Throws:
      AllocationError
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()