TsgcICEClient › Events › OnICECandidateError
Fires when candidate gathering fails for a specific STUN or TURN probe; inspect the error details to diagnose.
property OnICECandidateError: TsgcICECandidateErrorEvent;
// TsgcICECandidateErrorEvent = procedure(Sender: TObject; const aError: TsgcICE_Candidate_Error) of object
—
Fires when a STUN binding or TURN allocation attempted during GatherCandidates cannot produce a candidate. The aError record carries the URL of the server that failed, the address and port that were probed, the STUN/TURN error code (for example 401 Unauthorized, 437 Allocation Mismatch, 486 Allocation Quota Reached) and a textual reason. Gathering continues for other interfaces and servers; this event is informational and does not abort the session.
procedure TForm1.oICEICECandidateError(Sender: TObject;
const aError: TsgcICE_Candidate_Error);
begin
DoLog(Format('Candidate error: host=%s:%d code=%d %s',
[aError.Host, aError.Port, aError.ErrorCode, aError.ErrorText]));
end;