DtlsConnection.getNegotiatedProtocol

string getNegotiatedProtocol()

Gets the name of the application-layer protocol negotiated during the handshake.

If the peer did not use the ALPN extension, or did not advertise a protocol that matched one of conn's protocols, or the TLS backend does not support ALPN, then this will be null. See [gio.dtls_connection.DtlsConnection.setAdvertisedProtocols].

Returns

the negotiated protocol, or null