TeamSpeak SDK .Net
A C#-Wrapper around the native TeamSpeak-SDK. It provides the same functionality in a more fluent, object-oriented and asynchron API.
Main features:
* Cross-platform (Windows, Linux, MacOS, Android, iOS)
* Fully-featured TeamSpeak-SDK
* Modern API with object-oriented design
Main Classes:
* TeamSpeak.SDK.Client.Library - native clientlib
* TeamSpeak.SDK.Client.Connection - connection to a SDK server
* TeamSpeak.SDK.Client.Client - client on a SDK server
* TeamSpeak.SDK.Client.Channel - channel on a SDK server
* TeamSpeak.SDK.Client.FileTransfer - file transfer from or to a SDK server
* TeamSpeak.SDK.Client.WaveHandler - wave file playing locally
Usage in Linux, MacOS, Windows
If the native clientlib is in the library search path or next to the sdk assembly, initialising of the SDK is done automaticlly in the background.
Initialization of the SDK can be forced at any time using `Library.Initialize`.Код:using TeamSpeak.SDK.Client; /// ... using (Connection connection = new Connection()) { await connection.Start(identity, "localhost", 9987, "client"); await connection.SendTextMessage("Hello, World!"); await connection.Stop("And good bye!"); }
If the native library is not in the search path, it must be specified using TeamSpeak.SDK.Client;Код:using TeamSpeak.SDK.Client; /// ... try { Library.Initialize() } catch (DllNotFoundException) { // handle missing native library } using (Connection connection = new Connection()) { // ... }
Encryption and logging must be configured when the library is initialized. This is also done in `LibraryParameters`.Код:using TeamSpeak.SDK.Client; /// ... try { LibraryParameters parameters = new LibraryParameters("/tmp/renamed_libts3client_linux_amd64.so"); Library.Initialize(parameters); } catch (DllNotFoundException) { // handle missing native library } /// ...
Usage in AndroidКод:LibraryParameters parameters = new LibraryParameters() { // where the logs are written to LogFileFolder = "/var/log/teamspeak/", // Custom password encryption, leave unassigned for default handling ClientPasswordEncrypt = EncryptClientPassword, // Custom password encryption, leave unassigned for default handling CustomPacketEncrypt = EncryptPacket, // Custom package decryption, leave unassigned for default handling CustomPacketDecrypt = DecryptPacket, } try { Library.Initialize(parameters); } catch (DllNotFoundException) { // handle missing native library }
The SDK contains a Xamarin poject for Android, it can be found in `Source/Android`. The Library only needs to be referenced to be used. It already contains the Android specific native libraries.
Usage in iOSКод:using TeamSpeak.SDK.Client; /// ... using (Connection connection = new Connection()) { await connection.Start(identity, "localhost", 9987, "client"); await connection.SendTextMessage("Hello, World!"); await connection.Stop("And good bye!"); }
A Xamarin project for iOS is located at `Source/iOS`. In order for the sdk to work it is important that the correct static library is linked when building the app. For i386 and x86_64 `ts3_sdk_3.0.3.2/iOS/libts3client_ios_sdk_simulator.a` needs to be linked. For ARMv7, ARMv7s and ARM64instead link against `ts3_sdk_3.0.3.2/iOS/libts3client_ios_sdk_device.a`. Please see the example project in `Examples\iOS` for more details.
Aside from statically linking the native library, the TeamSpeak SDK is identical to the other platforms.
Код:using TeamSpeak.SDK.Client; /// ... using (Connection connection = new Connection()) { await connection.Start(identity, "localhost", 9987, "client"); await connection.SendTextMessage("Hello, World!"); await connection.Stop("And good bye!"); }
-
Скрыть объявление
Рады видеть Вас на русскоязычном форуме TeamSpeak!
У нас Вы можете скачать последнюю версию:
- Клиент TeamSpeak 3;
- Русификатор TeamSpeak 3;
- Сервер TeamSpeak 3;
- Найти много всего интересного
Перед регистрацией рекомендуем ознакомиться
Присоединяйтесь! Учите и обучайтесь!
-
Новая группа "Новичок" на нашем форуме!
Новые пользователи будут попадать в группу "Новичок".
Это сделано для того чтобы "Новички" ознакомились с форумом, так как в большинстве случаев проблема с которой вы хотите обратиться уже обсуждалась.
Перейти в тему обсуждения
Быстрый переход в группу Пользователь -
VPS/VDS и дедикейт сервера в аренду с DDoS защитой
- Низкий пинг
- Действующий SLA
- Рублевые цены без привязки к курсу валют
Бесплатный тестовый период VPS-OpenVZ
Попробовать
TeamSpeak 3 SDK .Net 0.2
A C#-Wrapper around the native TeamSpeak-SDK.