This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

send

Summary

Sends a message (data) on the RTCDataChannel’s underlying data transport.

Method of apis/webrtc/RTCDataChannelapis/webrtc/RTCDataChannel

Syntax

 object.send(data);

Parameters

data

Data-type
any

The send() method is overloaded to handle different data argument types. This parameter may be any of the following objects:

  • string – a series of Unicode characters
  • Blob – raw data represented by a Blob object
  • ArrayBuffer – data directly stored in an ArrayBuffer object
  • ArrayBufferView – data stored in a section of an ArrayBuffer object that the ArrayBufferview object references

Return Value

No return value

Related specifications

W3C Web RTC Specification
W3C Editor’s Draft