Create a new data channel for exchanging application-level data with this peer. The returned
Promise resolves once the new data channel has been opened.
If an error prevents the channel from being created or opened, the promise rejects with a
As a rule, the party that requested the peer-to-peer connection should create the data channels. This means you should call this function on a RainwayPeer you get from
RainwayRuntime.connect, and not elsewhere.
createDataChannel(channelName: string, mode: RainwayChannelMode): Promise<void>;
|channelName||string||The name of the Data Channel to create.|
|mode||RainwayChannelMode||A mode (reliable or unreliable) for the new channel.|
Whether the channel was successfully created and opened.