aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/rtcicecandidate/index.html
blob: fe5e3bc9ce28ccf9a8c49ff378ec924353fac47c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
title: RTCIceCandidate
slug: Web/API/RTCIceCandidate
translation_of: Web/API/RTCIceCandidate
---
<div>{{APIRef("WebRTC")}}</div>

<p><span class="seoSummary"><strong><code>RTCIceCandidate</code></strong> 인터페이스는 <a href="/en-US/docs/Web/API/WebRTC_API">WebRTC API</a>의 한 종류로서, {{domxref("RTCPeerConnection")}}을 구축 할 때 사용되기도하는 Internet Connectivity Establishment ({{Glossary("ICE")}})의 후보군 (candidate)를 말합니다.</span></p>

<p>하나의 ICE candidate는 WebRTC가 원격 장치와 통신을 하기 위해 요구되는 프로토콜과 라우팅에 대해 알려줍니다. WebRTC 피어 연결을 처음 시작하게되면, 일반적으로 여러개의 candiate들이 연결의 각 end에 의해 만들어집니다. 그리고 이 과정은 로컬 유저와 원격 유저가 연결을 위해 최고의 방법을 서로의 동의하에 선택하기 전까지 계속 됩니다. 이후에 WebRTC가 선택한 candidate를 사용해서 연결을 시도하게됩니다. </p>

<p>ICE 과정이 어떻게 동작하는지 자세히 알고 싶다면, <a href="/en-US/docs/Web/API/WebRTC_API/Session_lifetime">Lifetime of a WebRTC session</a>을 확인해보십시오.이외에도 <a href="/en-US/docs/Web/API/WebRTC_API/Connectivity">WebRTC connectivity</a>에서는 유용한 추가 정보를 제공합니다.</p>

<h2 id="생성자">생성자</h2>

<dl>
 <dt>{{domxref("RTCIceCandidate.RTCIceCandidate()","RTCIceCandidate()")}}</dt>
 <dd>단일 ICE candidate를 나타내기 위해 RTCIceCandidate 객체를 생성합니다. 옵션으로 {{domxref("RTCIceCandidateInit")}} 딕셔너리에 존재하는 객체를 이용해 설정이 가능합니다.
 <div class="note"><strong>Note:</strong> 이전 버전의 호환성을 위해서는, 생성자가 {{domxref("RTCIceCandidate.candidate", "candidate")}} 속성의 값을 가진 문자열을 {{domxref("RTCIceCandidateInit")}} 객체 대신에 입력 인자로 받습니다. 이는 <code>candidate</code><code>RTCIceCandidateInit</code>보다 더 많은 정보를 가지고 있기 때문입니다.</div>
 </dd>
</dl>

<h2 id="속성">속성</h2>

<dl>
 <dt>{{domxref("RTCIceCandidate.candidate", "candidate")}} {{readonlyInline}}</dt>
 <dd>연결성 확인을 위해 사용 될 수 있는 candidate에 대한 전달 주소를 나타내는 {{domxref("DOMString")}}입니다. 이 주소의 형식은 {{RFC(5245)}}에 정의된바와 같이 <code>candidate-attribute</code> 입니다. <code>RTCIceCandidate</code>가 "마지막 candidate"를 알려주면, 이 문자열은 빈 문자열 (<code>""</code>)이 됩니다.</dd>
 <dt>{{domxref("RTCIceCandidate.component", "component")}} {{ReadOnlyInline}}</dt>
 <dd>ICE candidate가 RTP (<code>rtp</code>) 인지 RTCP (<code>rtcp</code>)인지 알려주는 {{domxref("DOMString")}}입니다. 이 값들은 <code>candidate </code>라인 문자열에 있는 <code>"component-id"</code> 필드에서 가져와집니다. 허용되는 값은 {{domxref("RTCIceComponent")}} enum 타입에 정리되어있습니다.</dd>
 <dt>{{domxref("RTCIceCandidate.foundation", "foundation")}} {{readonlyInline}}</dt>
 <dd>같은  유형의 candidate와 동일한 식별자를 가진 {{domxref("DOMString")}}를 반환합니다. {{domxref("DOMString")}}는 동일한 베이스 (ICE 에이전트가 candidate를 보낸 주소)를 공유하고, 동일한 {{Glossary("STUN")}}서버에서 가져와집니다. 이 속성을 사용해서 {{domxref("RTCIceTransport")}}객체에 나타나는 candidate의 우선 순위를 매기고 연관을 시키면서 ICE 성능을 최적화 할 수 있습니다. </dd>
 <dt>{{domxref("RTCIceCandidate.ip", "ip")}} {{readonlyInline}}</dt>
 <dd>candidate의 IP 주소를 가지고 있는 {{domxref("DOMString")}}입니다.</dd>
 <dt>{{domxref("RTCIceCandidate.port", "port")}} {{readonlyInline}}</dt>
 <dd>candidate의 포트 넘버를 알려주는 정수 값 입니다.</dd>
 <dt>{{domxref("RTCIceCandidate.priority", "priority")}} {{readonlyInline}}</dt>
 <dd>candidate의 우선순위를 알려주는 long 정수 값 입니다.</dd>
 <dt>{{domxref("RTCIceCandidate.protocol", "protocol")}} {{readonlyInline}}</dt>
 <dd>candidate의 프로토콜이 <code>"tcp"</code>인지 <code>"udp"</code>인지 알려주는 문자열입니다. 이 문자열은 <code>RTCIceProtocol</code> enum 타입 중 하나 입니다.</dd>
 <dt>{{domxref("RTCIceCandidate.relatedAddress", "relatedAddress")}} {{readonlyInline}}</dt>
 <dd>candidate가 다른 candidate, 즉 호스트 candidate에서 가져와졌다면, <code>relatedAddress</code>는 호스트 candidate의 IP 주소를 포함하는 {{domxref("DOMString")}}입니다. 호스트 candidate에서 이 값은 <code>null </code>입니다.</dd>
 <dt>{{domxref("RTCIceCandidate.relatedPort", "relatedPort")}} {{readonlyInline}}</dt>
 <dd>candidate가 relay 혹은 reflexive candidate로 부터 가져와진 경우, <code>relatedPort</code>는 해당하는 호스트 candidate의 포트 넘버를 가르킵니다. 마찬가지로, 호스트 candidate에서 이 값은 <code>null </code>입니다.</dd>
 <dt>{{domxref("RTCIceCandidate.sdpMid", "sdpMid")}} {{readonlyInline}}</dt>
 <dd>candidate의 미디어 스트림 식별 태그를 정의하는 {{domxref("DOMString")}}입니다. 여기서 식별 태그는 candidate와 연관이 있는 컴포넌트안의 미디어 스트림을 유일하게 식별합니다. candidate와 관련이 있는 미디어 스트림이 존재하지 않으면, 이 값은 <code>null </code>입니다.</dd>
 <dt>{{domxref("RTCIceCandidate.sdpMLineIndex", "sdpMLineIndex")}} {{readonlyInline}}</dt>
 <dd>이 값이 <code>null</code>이 아니라면, <code>sdpMLineIndex</code>는 candidate와 연관 된 {{Glossary("SDP")}}의 미디어 설명에 대한, 0을 기준으로 하는 색인 번호를 알려줍니다 (<a href="https://tools.ietf.org/html/rfc4566">RFC 4566</a>에 정의되어 있습니다.). </dd>
 <dt>{{domxref("RTCIceCandidate.tcpType", "tcpType")}} {{readonlyInline}}</dt>
 <dd><code>protocol</code><code>"tcp"</code>라면,<code>tcpType</code>은 TCP candidate의 타입을 알려줍니다. 이외에는 <code>tcpType</code><code>null </code>입니다.</dd>
 <dt>{{domxref("RTCIceCandidate.type", "type")}} {{readonlyInline}}</dt>
 <dd>{{domxref("RTCIceCandidateType")}} enum 타입에 존재하는 문자열에 속하는 candidate의 타입을 알려주는 {{domxref("DOMString")}}입니다. </dd>
 <dt>{{domxref("RTCIceCandidate.usernameFragment", "usernameFragment")}} {{ReadOnlyInline}}</dt>
 <dd>ICE가 무작위로 생성된 비밀번호 (<code>"ice-pwd"</code>) 와 함께 메세지의 무결성을 확인하기 위해 사용하는 무작위로 생성된 유저 이름 조각 (<code>"ice-ufrag"</code>)을 가지고 있는 {{domxref("DOMString")}}입니다. 이 문자열을 사용해서 ICE 생성의 버전을 확인 할 수 있습니다. ICE가 재시작하더라도, 같은 버전의 ICE 프로세스는 동일한 <code>usernameFragment</code>를 가지게 됩니다.</dd>
</dl>

<h2 id="메소드">메소드</h2>

<dl>
 <dt>{{domxref("RTCIceCandidate.toJSON", "toJSON()")}}</dt>
 <dd><code>toJSON()</code><code>RTCIceCandidate</code>의 현재 저장된 설정을 담은 {{Glossary("JSON")}} 표현식을 {{domxref("RTCIceCandidateInit")}} 객체의 형태로 변환시킨 {{domxref("DOMString")}}를 반환합니다.</dd>
</dl>

<h2 id="예시">예시</h2>

<p>예시를 보려면, 전체 과정을 설명해주는 <a href="/en-US/docs/Web/API/WebRTC_API/Signaling_and_video_calling">Signaling and video calling</a>문서를 확인하십시오.</p>

<h2 id="명세">명세</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">명세</th>
   <th scope="col">상태</th>
   <th scope="col">코멘트</th>
  </tr>
  <tr>
   <td>{{SpecName('WebRTC 1.0', '#rtcicecandidate-interface', 'RTCIceCandidate')}}</td>
   <td>{{Spec2('WebRTC 1.0')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="브라우저_호환성">브라우저 호환성</h2>

<div>


<p>{{Compat("api.RTCIceCandidate")}}</p>
</div>