SendChannelData Method

Sends data to a peer using a given channel.

Syntax

public void SendChannelData(string channelId, byte[] data);
Public Sub SendChannelData(ByVal ChannelId As String, ByVal Data As String)

Remarks

This method sends the specified Data to the peer associated with the channel identified by ChannelId.

Note that there must be an active permission for the IP address of the peer associated with the specified channel, otherwise the server will drop the message. Refer to the CreateChannel method's documentation for more information.

About Data Relaying

There are two mechanisms for sending data between a TURN client (e.g., this component) and a TURN server: indications and channels.

  • Indications work by encapsulating the data within a STUN packet, which allows them to be sent at anytime without any further configuration. Use the SendData method to send data in an indication.
  • Channels must be created ahead-of-time, but allow for more efficient data transfer between the client and server by sending data packets with minimal overhead. Use the SendChannelData method to send data over a channel.
In both cases, the server will only relay data to/from a peer if there is an active permission for the peer's IP address.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks P2P 2020 .NET Edition - Version 20.0 [Build 8235]