Virtual Method


since: 2.60


set_advertised_protocols (
  GDtlsConnection* conn,
  const gchar* const* protocols


Sets the list of application-layer protocols to advertise that the caller is willing to speak on this connection. The Application-Layer Protocol Negotiation (ALPN) extension will be used to negotiate a compatible protocol with the peer; use g_dtls_connection_get_negotiated_protocol() to find the negotiated protocol after the handshake. Specifying NULL for the the value of protocols will disable ALPN negotiation.

See IANA TLS ALPN Protocol IDs for a list of registered protocol IDs.

Available since: 2.60



Type: An array of gchar*

A NULL-terminated array of ALPN protocol names (eg, “http/1.1”, “h2”), or NULL.

The argument can be NULL.
The array must be NULL-terminated.
The data is owned by the caller of the function.
Each element is a NUL terminated UTF-8 string.