Click or drag to resize
Connection Class
A connection to a TeamSpeak-Server
Inheritance Hierarchy
SystemObject
  TeamSpeak.Sdk.ClientConnection

Namespace:  TeamSpeak.Sdk.Client
Assembly:  TeamSpeak.Sdk (in TeamSpeak.Sdk.dll) Version: 0.1.6124.20226 (0.1.0.0)
Syntax
public class Connection : IDisposable

The Connection type exposes the following members.

Constructors
  NameDescription
Public methodConnection
Spawns a new Connection
Top
Properties
  NameDescription
Public propertyAllChannels
A list of all channels on the virtual server
Public propertyAllClients
A list of all currently visible clients on the virtual server
Public propertyCaptureDevice
Currently open capture device. Set using OpenCapture(ISoundDevice)
Public propertyChannels
A list of channels who have the channel as a parent
Public propertyChannelsOnline
Number of channels currently on this virtual server. Needs to be requested using RefreshVariables.
Public propertyClientsOnline
Number of clients currently on this virtual server. Needs to be requested using RefreshVariables.
Public propertyCodecEncryptionMode
Defines if voice data encryption is configured per channel, globally forced on or globally forced off for this virtual server. The default behavior is configure per channel, in this case modifying CodecIsUnencrypted defines voice data encryption of individual channels.
Public propertyCreated
Time when this virtual server was created. Always available when connected.
Public propertyID
ID of the client
Public propertyIsVoiceRecording
When using EditCapturedVoiceData to record voice, you should notify the server when recording starts or stops
Public propertyLocalTestMode
Instead of sending the sound through the network, it can be routed directly through the playback device, so the user will get immediate audible feedback when for example configuring some sound settings.
Public propertyMaxClients
Defines maximum number of clients which may connect to this server. Needs to be requested using RefreshVariables.
Public propertyName
Name of this virtual server. Always available when connected.
Public propertyPlatform
Operating system used by this server. Always available when connected.
Public propertyPlaybackDevice
Currently open playback device. Set using OpenPlayback(ISoundDevice)
Public propertyPreprocessor
Sound Preprocessor Parameters
Public propertySelf
the connection as a client object
Public propertyServerIp
IP of the server (seen from the client side)
Public propertyServerPort
Port of the server (seen from the client side)
Public propertySpeedLimitDown
The download speed limit for the specified virtual server in bytes/s.
Public propertySpeedLimitUp
The upload speed limit for the specified virtual server in bytes/s.
Public propertyStatus
Status of the connection to the given server
Public propertyUniqueIdentifier
Unique ID for this virtual server. Stays the same after restarting the server application. Always available when connected.
Public propertyUptime
Uptime of this virtual server. Needs to be requested using RefreshVariables.
Public propertyVersion
Application version of this server. Always available when connected.
Public propertyVolumeFactorWave
Adjust the volume of wave files played by PlayWaveFile(String, Boolean). The value is a float defining the volume reduction in decibel. Reasonable values range from “-40.0” (very silent) to “0.0” (loudest).
Public propertyVolumeModifier
Modify the voice volume of other speakers. Value is in decibel, so 0 is no modification, negative values make the signal quieter and values greater than zero boost the signal louder than it is. Be careful with high positive values, as you can really cause bad audio quality due to clipping. The maximum possible Value is 30. Zero and all negative values cannot cause clipping and distortion, and are preferred for optimal audio quality. Values greater than zero and less than +6 dB might cause moderate clipping and distortion, but should still be within acceptable bounds. Values greater than +6 dB will cause clipping and distortion that will negatively affect your audio quality. It is advised to choose lower values. Generally we recommend to not allow values higher than 15 db.
Public propertyWelcomeMessage
Optional welcome message sent to the client on login. This value should be queried by the client after connection has been established, it is not updated afterwards.
Top
Methods
  NameDescription
Public methodActivateCaptureDevice
When connecting to multiple servers with the same client, the capture device can only be active for one server at the same time. As soon as the client connects to a new server, the Library will deactivate the capture device for the previously active server. When a user wants to talk to that previous server again, the client needs to reactivate the capture device.
Public methodAllowWhispersFrom
Add a client to the whisper allow list.
Public methodClose
Closes the connection
Public methodCloseCaptureDevice
Close the capture device
Public methodClosePlaybackDevice
Close the playback device
Public methodCreateChannel
Create a new Channel
Protected methodDispose
Releases the unmanaged resources used by the CustomDevice and optionally releases the managed resources.
Public methodEquals (Inherited from Object.)
Protected methodFinalize
Allows Connection to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Overrides ObjectFinalize.)
Public methodFindClient
Returns every client with a matching UniqueId
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodInitiateGracefulPlaybackShutdown
Prepares the playback device be closed via ClosePlaybackDevice. Should be used to prevent interrupting of still playing sounds.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodMove(Channel, Channel, Channel)
Move a channel to a new parent channel
Public methodMove(Client, Channel, String)
Move a client to a channel.
Public methodMute
Mutes one or more clients
Public methodOpenCapture
To initialize a capture device
Public methodOpenPlayback
To initialize a playback device
Public methodPlayWaveFile
Play a local wave file
Public methodRefreshVariables
Refreshing the server information.
Public methodRemoveFromAllowedWhispersFrom
Remove a client from the whisper allow list.
Public methodSendTextMessage(String)
Send a text message to the server
Public methodSendTextMessage(Channel, String)
Send a text message to a channel
Public methodSendTextMessage(Client, String)
Send a private text message to a client
Public methodSet3DListenerAttributes
Set the position, velocity and orientation of the listener in 3D space
Public methodSet3DSettings
Adjusts 3D sound system settings
Public methodStart(String, String, UInt32, String, String, String, String)
Connect to a TeamSpeak 3 server
Public methodStart(String, String, UInt32, String, String, String, String)
Connect to a TeamSpeak 3 server
Public methodStop
Disconnect from a TeamSpeak 3 server
Public methodSubscribe
Subscribes to one or more channels
Public methodSubscribeAll
Subscribe to all channels on the server
Public methodToString (Inherited from Object.)
Public methodUnmute
Unmute one or more clients
Public methodUnsubscribe
Unsubscribes from one or more channels
Public methodUnsubscribeAll
Unsubscribe from all channels on the server
Top
Events
  NameDescription
Public eventChannelChanged
Called when a channel was changed
Public eventChannelDeleted
After deleting a Channel the event will be called.
Public eventChannelDescriptionUpdated
Called when the Description was edited
Public eventChannelMessage
Called when a channel message was received
Public eventChannelMoved
Called when a channel is being moved.
Public eventChannelPasswordChanged
Called when a Password was modified.
Public eventChannelSubscribed
Called when channel has been subscribed
Public eventChannelSubscribesFinished
Marks the end of multiple calls to ChannelSubscribed
Public eventChannelUnsubscribed
Called when channel has been unsubscribed
Public eventChannelUnsubscribesFinished
Marks the end of multiple calls to ChannelUnsubscribed
Public eventCheckServerUniqueIdentifier
Used to check if the unique identifier is the correct one
Public eventClientKickedFromChannel
When a client is kicked from a channel
Public eventClientKickedFromServer
When a client is kicked from the server
Public eventClientMessage
Called when a private text message from a client was received
Public eventClientMoved
Called when a client is actively switching channels.
Public eventClientMovedSubscription
Once a channel has been subscribed or unsubscribed, the event is called for each client in the subscribed channel. The event is not to be confused with ClientMoved, which is called for clients actively switching channels.
Public eventClientTimeout
When a clients is moved because of a timeout
Public eventClientUpdated
Called when a client was changed
Public eventCustom3dRolloffCalculationClient
Called to calculate volume attenuation for distance in 3D positioning of clients.
Public eventCustom3dRolloffCalculationWaveReceived
Called to calculate volume attenuation for distance in 3D positioning of a wave file that was opened with PlayWaveFile(String, Boolean).
Public eventEditCapturedVoiceData
Called after sound is recorded from the sound device and is preprocessed. This event can be used to get/alter recorded sound. It can also be used to determine if this sound will be send, or discarded.
Public eventEditMixedPlaybackVoiceData
The following event is called when all sounds that are about to be played back for this server connection have been mixed. This is the last chance to alter/get sound. The event can be used to alter or get the sound data before playback.
Public eventEditPlaybackVoiceData
Called when a incoming voice packet from a remote client was decoded and is about to be played, before it is 3D positioned and mixed with other sound sources. The event can be used to alter the voice data (for example when you want to do effects on it) or to record the voice data.
Public eventEditPostProcessVoiceData
Called when a incoming voice packet from a remote client was decoded and 3D positioned and is about to be played, but before it is mixed with other sounds sources. The event can be used to alter or get the voice data after it has been 3D positioned.
Public eventFileInfoReceived
Called after GetFileInfo(String, String) containing the reply by the server
Public eventFileTransferStatusReceived
Called when a file finished being transfered, triggered by SendFile Overload or RequestFile Overload has finished or aborted with an error.
Public eventNewChannel
Informs about the existence of each channel, after connection has been established, all current channels on the server are announced. This happens with delays to avoid a flood of information after connecting.
Public eventNewChannelCreated
After on successfully creating a new Channel the event will be called
Public eventPlaybackShutdownCompleted
Public eventProtocolVersionReceived
While connecting to a server, the protocol version is reported.
Public eventServerError
Error codes sent by the server to the client
Public eventServerMessage
Called when a server message was received
Public eventServerStop
Called when the server has been shutdown
Public eventServerUpdated
Called when the virtual server was changed
Public eventStatusChanged
After calling Start Overload the client will be informed of the connection status changes by the event
Public eventTalkStatusChanged
When a client starts or stops talking
Public eventWhisperIgnored
Used when whisper is received from a Client that has not been added to the whisper allow list.
Top
See Also