Disconnecting from a server

To disconnect from a TeamSpeak 3 server call

unsigned int ts3client_stopConnection(serverConnectionHandlerID,  
 quitMessage); 
uint64 serverConnectionHandlerID;
const char* quitMessage;
 

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h.

Like with connecting, on successful disconnecting the client will receive an event:


void onConnectStatusChangeEvent(serverConnectionHandlerID,  
 newStatus,  
 errorNumber); 
uint64 serverConnectionHandlerID;
int newStatus;
int errorNumber;
 


Should the server be shutdown, the follow event will be called:

void onServerStopEvent(serverConnectionHandlerID,  
 shutdownMessage); 
uint64 serverConnectionHandlerID;
const char* shutdownMessage;