aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/rtcpeerconnection/ondatachannel/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ko/web/api/rtcpeerconnection/ondatachannel/index.html')
-rw-r--r--files/ko/web/api/rtcpeerconnection/ondatachannel/index.html62
1 files changed, 62 insertions, 0 deletions
diff --git a/files/ko/web/api/rtcpeerconnection/ondatachannel/index.html b/files/ko/web/api/rtcpeerconnection/ondatachannel/index.html
new file mode 100644
index 0000000000..d32f6c9b80
--- /dev/null
+++ b/files/ko/web/api/rtcpeerconnection/ondatachannel/index.html
@@ -0,0 +1,62 @@
+---
+title: RTCPeerConnection.ondatachannel
+slug: Web/API/RTCPeerConnection/ondatachannel
+translation_of: Web/API/RTCPeerConnection/ondatachannel
+---
+<p>{{APIRef("WebRTC")}}{{SeeCompatTable}}</p>
+
+<p><code><strong>RTCPeerConnection.ondatachannel</strong></code> 속성은 {{domxref("RTCPeerConnection")}}에서 발생하는 {{event("datachannel")}} 이벤트에 의해 호출되는 {{domxref("EventHandler")}}입니다. 이 속성에는 함수를 정의하게됩니다. {{domxref("RTCDataChannelEvent")}}의 한 종류인 이 이벤트는 원격 유저가 {{domxref("RTCPeerConnection.createDataChannel", "createDataChannel()")}}를 호출해서 연결에 {{domxref("RTCDataChannel")}}가 추가되었을 때, 전달됩니다. </p>
+
+<p>이 이벤트를 수신하게되는 시점에서는 {{domxref("RTCDataChannel")}}가 아직 열리지 않았을 수 있습니다. 사용하기 전에 꼭 신규 <code>RTCDataChannel</code>에 <code>"open"</code>이벤트가 발생하는 것을 확인하십시오.</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox"><em>RTCPeerConnection</em>.ondatachannel = <em>function</em>;
+</pre>
+
+<h3 id="값">값</h3>
+
+<p>이 속성에 지정하는 함수는 단일 패러미터를 입력 인자로 받습니다. <code>channel</code> 속성에 생성된 {{domxref("RTCDataChannel")}}를 제공하는 {{domxref("RTCDataChannelEvent")}} 입니다. </p>
+
+<h2 id="예시">예시</h2>
+
+<pre class="brush: js">pc.ondatachannel = function(ev) {
+  console.log('Data channel is created!');
+  ev.channel.onopen = function() {
+  console.log('Data channel is open and ready to be used.');
+  };
+};
+</pre>
+
+<h2 id="명세">명세</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">명세</th>
+ <th scope="col">상태</th>
+ <th scope="col">코멘트</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{ SpecName('WebRTC 1.0', '#dom-rtcpeerconnection-ondatachannel', 'RTCPeerConnection.ondatachannel') }}</td>
+ <td>{{ Spec2('WebRTC 1.0') }}</td>
+ <td>Initial specification.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="브라우저_호환성">브라우저 호환성</h2>
+
+
+
+<p>{{Compat("api.RTCPeerConnection.ondatachannel")}}</p>
+
+<h2 id="참조">참조</h2>
+
+<ul>
+ <li>The {{event("datachannel")}} event and its type, {{domxref("RTCDataChannelEvent")}}.</li>
+ <li>{{domxref("RTCPeerConnection.createDataChannel()")}}</li>
+ <li><a href="/en-US/docs/Web/API/WebRTC_API/Simple_RTCDataChannel_sample">A simple RTCDataChannel sample</a></li>
+</ul>