init
This commit is contained in:
5
docs/client_html/ar01s08.html
Normal file
5
docs/client_html/ar01s08.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Managing server connection handlers</title><link rel="stylesheet" href="ts3doc.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="TeamSpeak 3 Client SDK Developer Manual"><link rel="up" href="index.html" title="TeamSpeak 3 Client SDK Developer Manual"><link rel="prev" href="ar01s07.html" title="Shutting down"><link rel="next" href="ar01s09.html" title="Connecting to a server"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><img id="logo" src="images/logo.png"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Managing server connection handlers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s07.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center"><EFBFBD></th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s09.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="connecthandler"></a>Managing server connection handlers</h2></div></div></div><p>Before connecting to a TeamSpeak 3 server, a new server connection handler needs to be spawned. Each handler is identified by a unique ID (usually called <em class="parameter"><code>serverConnectionHandlerID</code></em>). With one server connection handler a connection can be established and dropped multiple times, so for simply reconnecting to the same or another server no new handler needs to be spawned but existing ones can be reused. However, for using multiple connections simultaneously a new handler has to be spawned for each connection.</p><a class="indexterm" name="idm44835435059952"></a><p>To create a new server connection handler and receive its ID, call
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_spawnNewServerConnectionHandler</b>(</code></td><td><var class="pdparam">port</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>int <var class="pdparam">port</var></code>;<br><code>uint64* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835435056304"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>port</code></em></p><p>Port the client should bind on. Specify zero to let the operating system chose any free port. In most cases passing zero is the best choice.</p><p>If <em class="parameter"><code>port</code></em> is specified, the function return value should be checked for <em class="structfield"><code>ERROR_unable_to_bind_network_port</code></em>. Handle this error by switching to an alternative port until a "free" port is hit and the function returns <em class="structfield"><code>ERROR_ok</code></em>.</p><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left">Caution</th></tr><tr><td align="left" valign="top"><p>Do not specify a non-zero value for <em class="parameter"><code>port</code></em> unless you absolutely need a specific port. Passing zero is the better way in most use cases.</p></td></tr></table></div></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the server connection handler ID.</p></li></ul></div><p>To destroy a server connection handler, call
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_destroyServerConnectionHandler</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835435046000"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler to destroy.</p></li></ul></div><p>Both functions return <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>.</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>Destroying invalidates the handler ID, so it must not be used anymore afterwards. Also do not destroy a server connection handler ID from within a callback.</p></td></tr></table></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s07.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><EFBFBD></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s09.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Shutting down<77></td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"><EFBFBD>Connecting to a server</td></tr></table></div></body></html>
|
||||
Reference in New Issue
Block a user