HomeGuidesAPI Reference
HubBlogChangelogSupport ForumLog In
API Reference

Web SDK - DataChannel

Home > @rainway/web > DataChannel

DataChannel class

Represents a data channel between oursevles and a remote peer

Signature:

export declare class DataChannel extends EventEmitter<DataChannelEvents> 

Extends: EventEmitter<DataChannelEvents>

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the DataChannel class.

Properties

PropertyModifiersTypeDescription
idstringThe unique identifier for this data channel.
modeDataChannelModeThe mode for this data channel.
peerPeerThe

Methods

MethodModifiersDescription
send(data)Transmits data to the remote peer. If the data is a string, it will be encoded and sent as UTF-8.