[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/API/WebRTC_API/Using_data_channels [Back]  [Original]

WebRTC data channel - Web API | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

WebRTC data channel

RTCPeerConnection WebRTC Peerconnction Peer . WebRTC . peer connection , .

: WebRTC RTCDataChannel Datagram Transport Layer Security (DTLS) . Security .

In this article

RTCDataChannel .

. .

(Automatic negotiation)

RTCDataChannel Peer . negotiated createDataChannel() false . RTCPeerConnection (remote peer) .

createDataChannel() RTCDataChannel . open RTCDataChannel .

js
let dataChannel = pc.createDataChannel("MyApp Channel");

dataChannel.addEventListener("open", (event) => {
  beginTransmission(dataChannel);
});

(Manual negotiation)

Data channel RTCPeerConnection createDataChannel() RTCDataChannel . negotiated true . .

. RTCDataChannel id negotiated true . RTCPeerConnection .

js
let dataChannel = pc.createDataChannel("MyApp Channel", {
  negotiated: true,
});

dataChannel.addEventListener("open", (event) => {
  beginTransmission(dataChannel);
});

requestRemoteChannel(dataChannel.id);

negotiated true requestRemoteChannel() ID (negotiation) .

id .

(Buffering)

WebRTC . . buffer . .

. , . ( .) WebRTC user agent's WebRTC .

. Even when user agents share the same underlying library for handling Stream Control Transmission Protocol (SCTP) data, there can still be variations due to how the library is used. Firefox SCTP usrsctp . RTCDataChannel .

Firefox Firefox . Firefox SCTP deprecated . . RTCDataChannel .

16kiB . user agents .

~~ 64kiB (16kiB if you want to support cross-browser exchange of data) RTCDataChannel . RTCDataChannel SCTP . . Support for messages larger than the network layer's Maximum transmission unit was added almost as an afterthought, in case signaling messages needed to be larger than the MTU. . .~~

~~ .~~ WebRTC SCTP . .

end-of-record(EOR) ( ) . Firefox 57 . Chrome .(Chromium Bug 7774 ). EOR RTCDataChannel . ( 256kiB Firfox 1GiB). 256kiB . .

(stream schedulers) SCTP ndata specification . WebRTC . IETF (draft form) SCTP .

Firefox ndata . Firefox bug 1381145 . Chrome Chrome Bug 5696 ndata .

. Demystifyijng WebRTC's Data Channel Message Size Limitations, written by Lennart Grahl. . . EOR .

(Security)

WebRTC . RTCDataChannel Transport Layer Security (TLS) Datagram Transport Layer Security (DTLS) . TLS HTTPS data channel .

WebRTC peer-to-peer . .


Web Proxy Viewer  |  New URL  |  Original Page