 | ConnectionStart Method (String, String, UInt32, String, String, String, String) |
Connect to a TeamSpeak 3 server
Namespace:
TeamSpeak.Sdk.Client
Assembly:
TeamSpeak.Sdk (in TeamSpeak.Sdk.dll) Version: 0.1.6124.20226 (0.1.0.0)
Syntaxpublic Task Start(
string identity,
string ip,
uint port,
string nickname,
string defaultChannel = null,
string defaultChannelPassword = null,
string serverPassword = null
)
Public Function Start (
identity As String,
ip As String,
port As UInteger,
nickname As String,
Optional defaultChannel As String = Nothing,
Optional defaultChannelPassword As String = Nothing,
Optional serverPassword As String = Nothing
) As Task
public:
Task^ Start(
String^ identity,
String^ ip,
unsigned int port,
String^ nickname,
String^ defaultChannel = nullptr,
String^ defaultChannelPassword = nullptr,
String^ serverPassword = nullptr
)
member Start :
identity : string *
ip : string *
port : uint32 *
nickname : string *
?defaultChannel : string *
?defaultChannelPassword : string *
?serverPassword : string
(* Defaults:
let _defaultChannel = defaultArg defaultChannel null
let _defaultChannelPassword = defaultArg defaultChannelPassword null
let _serverPassword = defaultArg serverPassword null
*)
-> Task
Parameters
- identity
- Type: SystemString
Unique identifier for this server connection. Created with CreateIdentity - ip
- Type: SystemString
Hostname or IP of the TeamSpeak 3 server. - port
- Type: SystemUInt32
UDP port of the TeamSpeak 3 server, by default 9987. - nickname
- Type: SystemString
On login, the client attempts to take this nickname on the connected server. Note this is not necessarily the actually assigned nickname, as the server can modify the nickname ("gandalf_1" instead the requested "gandalf") or refuse blocked names. - defaultChannel (Optional)
- Type: SystemString
A channel on the TeamSpeak 3 server. If the channel exists and the user has sufficient rights and supplies the correct password if required, the channel will be joined on login. - defaultChannelPassword (Optional)
- Type: SystemString
Password for the default channel. Pass null or an empty string if no password is required or no default channel is specified. - serverPassword (Optional)
- Type: SystemString
Password for the server. Pass null or an empty string if the server does not require a password.
Return Value
Type:
TaskA task that represents the asynchronous operation.
Remarks If you pass a hostname instead of an IP, the Client Lib will try to resolve it to an IP, but the function may block for an unusually long period of time while resolving is taking place. If you are relying on the function to return quickly, we recommend to resolve the hostname yourself (e.g.asynchronously) and then call with the IP instead of the hostname.
See Also