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
Property | Modifiers | Type | Description |
---|---|---|---|
id | string | The unique identifier for this data channel. | |
mode | DataChannelMode | The mode for this data channel. | |
peer | Peer | The |
Methods
Method | Modifiers | Description |
---|---|---|
send(data) | Transmits data to the remote peer. If the data is a string, it will be encoded and sent as UTF-8. |