TeamSpeak 3 Query Library

Description
This library allows you to query team speak 3 servers using the query port. All queries are implemented type safe and the library is written to work with .Net 3.5 SP1 or higher inluding support for silverlight 3.0 or higher and windows phone 7.1. The project is currently under development using Visual Studio 2010 SP1.

Development has moved to Github. You can find the latest source here:

Downloads of new releases will be provided as usual here!



Requirements for release versions
  • Visual Studio 2008 SP1 with .Net Framework 3.5 SP1 or higher
  • Silverlight 3 Toolkit (only if you want to use this library with silverlight)
  • WP 7.1 beta tools (only if you want to us this library with wp 7.1)

How to use
  • For Windows Phone 7.1 reference the assembly : TS3QueryLib.Core.WP7
  • For Silverlight reference the assembly: TS3QueryLib.Core.Silverlight
  • For ASP.Net, Winforms, WPF and so on reference the assembly: TS3QueryLib.Core.Framework

As Teamspeak 3 does not natively supports running as a service, a wrapper was written as part of this library that allows you to run Teamspeak 3 as a windows service. You can download it here.

Sample Code (Silverlight)

using System.Windows;
using System.Windows.Controls;
using TS3QueryLib.Core;
using TS3QueryLib.Core.Common;
using TS3QueryLib.Core.Query;

namespace TS3RemoteControl
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
        }

        private void ConnectButton_Click(object sender, RoutedEventArgs e)
        {
            // The QueryRunner is used to send queries. All Queries are implemented type save and return objects with properties
            using (QueryRunner queryRunner = new QueryRunner(new SyncTcpDispatcher("127.0.0.1", 10011)))  // host and port
            {
		// connection to the TS3-Server is established with the first query command
		
		// login using the provided username and password and show a dump-output of the response in a textbox
		//AppendToOutput(queryRunner.Login("serveradmin", "YourPassword")).GetDumpString(); 
		
		// select server with id 1 and show a dump-output of the response in a textbox
		AppendToOutput(queryRunner.SelectVirtualServerById(1).GetDumpString()); 
		// get information about yourself and show a dump-output of the response in a textbox
		AppendToOutput(queryRunner.SendWhoAmI().GetDumpString()); 
            }
        }

        private void AppendToOutput(string text)
        {
            OutputTextBox.Text += "\n" + text;
        }
    }
} 

Last edited Jul 5 at 2:07 PM by Scordo, version 21