This article will introduce you to the concept of channels on a TeamSpeak SDK server.
Topics:
Any client connecting to a TeamSpeak Server, will exist inside a channel. A channel defines a group of users who can talk to each other. As a basic rule, clients can only talk and listen to other clients within the same channel. The SDK includes functions to create, modify and delete channels and move clients between channels. This allows developers to dynamically define who is allowed to talk with whom.
For each channel that is created, the developer can decide, whether it is on the same level as the default channel or if it’s a subchannel below another channel.
Every channel has his own ChannelProperties
which can store information and configurations for the channel:
enum ChannelProperties {
CHANNEL_NAME = 0, //Name of the channel. (Unique)
CHANNEL_TOPIC, //Single-line channel topic.
CHANNEL_DESCRIPTION, //Optional channel description. Can have multiple lines.
CHANNEL_PASSWORD, //Password for password-protected channels
CHANNEL_CODEC, //Codec used for this channel
CHANNEL_CODEC_QUALITY, //Quality of channel codec of this channel.
CHANNEL_MAXCLIENTS, //Number of maximum clients who can join this channel.
CHANNEL_MAXFAMILYCLIENTS, //Number of maximum clients who can join this channel and all subchannels.
CHANNEL_ORDER, //Defines how channels are sorted in the GUI.
//Channel order is the ID of the predecessor channel after which this channel
//is to be sorted. If 0, the channel is sorted at the top of its hirarchy.
CHANNEL_FLAG_PERMANENT, //Permanent channels will be restored when the server restarts.
CHANNEL_FLAG_SEMI_PERMANENT, //Semi-permanent channels are not automatically deleted when the last user left but will not be restored when the server restarts.
CHANNEL_FLAG_DEFAULT, //Channel is the default channel. There can only be one default channel per server.
CHANNEL_FLAG_PASSWORD, //If set, channel is password protected. The password itself is stored in CHANNEL_PASSWORD.
CHANNEL_CODEC_LATENCY_FACTOR, //Latency of this channel.
CHANNEL_CODEC_IS_UNENCRYPTED, //If 1, this channel is not using encrypted voice data. If 0, voice data is encrypted for this channel
CHANNEL_SECURITY_SALT, //Sets the options+salt for security hash (SDK only)
CHANNEL_DELETE_DELAY, //How many seconds to wait before deleting this channel
CHANNEL_ENDMARKER,
};
If permitted, the user can switch between these channels.
The rule that clients can only talk to other clients within the same channel can be overruled by the whisper feature. With whispers a client can talk to specific clients inside or outside his own channel and to all clients in other channels. Whisper lists can be defined for multiple target clients and channels.
You have learned the basics of the TeamSpeak channel concept.