TsgcUDPServer › Methods › ClearDTLS
Discards the cached DTLS session state so the next datagram triggers a fresh DTLS handshake with every peer.
procedure ClearDTLS;
After the first encrypted datagram is exchanged with each client, the server caches the negotiated DTLS session keys per peer and reuses them for subsequent traffic. Call ClearDTLS to force the server to forget every cached session so the next incoming or outgoing datagram triggers a new handshake; this is required after modifying DTLSOptions (certificates, verification flags, OpenSSL API version). Stop also calls ClearDTLS internally. The method has no effect when DTLS is False and is safe to call at any time.
oServer.DTLSOptions.CertFile := 'new-server.pem';
oServer.DTLSOptions.KeyFile := 'new-server.key';
oServer.ClearDTLS;