1 /* 2 * Copyright (c) 2021 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 package org.webrtc; 12 13 public final class IceCandidateErrorEvent { 14 /** The local IP address used to communicate with the STUN or TURN server. */ 15 public final String address; 16 /** The port used to communicate with the STUN or TURN server. */ 17 public final int port; 18 /** 19 * The STUN or TURN URL that identifies the STUN or TURN server for which the failure occurred. 20 */ 21 public final String url; 22 /** 23 * The numeric STUN error code returned by the STUN or TURN server. If no host candidate can reach 24 * the server, errorCode will be set to the value 701 which is outside the STUN error code range. 25 * This error is only fired once per server URL while in the RTCIceGatheringState of "gathering". 26 */ 27 public final int errorCode; 28 /** 29 * The STUN reason text returned by the STUN or TURN server. If the server could not be reached, 30 * errorText will be set to an implementation-specific value providing details about the error. 31 */ 32 public final String errorText; 33 34 @CalledByNative IceCandidateErrorEvent( String address, int port, String url, int errorCode, String errorText)35 public IceCandidateErrorEvent( 36 String address, int port, String url, int errorCode, String errorText) { 37 this.address = address; 38 this.port = port; 39 this.url = url; 40 this.errorCode = errorCode; 41 this.errorText = errorText; 42 } 43 } 44