Home > rainway-sdk-native > Peer > createDataChannel
Peer.createDataChannel() method
Create a new custom user data channel with a specific peer. This is only valid if we were the one who initiated the connection.
Signature:
createDataChannel(name: string, mode: RainwayChannelMode): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
name | string | Name of the channel (will be used for referencing it later if created). |
mode | RainwayChannelMode | Channel mode configuration. |
Returns:
Promise<void>