Class SFS2X.Requests.System.LogoutRequest

Logs the user out of the current server Zone.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a new LogoutRequest instance.

Class Detail

SFS2X.Requests.System.LogoutRequest()
Creates a new LogoutRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.

This request logs the user out of the current server Zone. The user is notified of the logout operation by means of the logout event. This doesn't shut down the connection, so the user will be able to login again in the same Zone or in a different one right after the confirmation event.

The following example performs a logout from the current Zone:

function someMethod()
{
	sfs.addEventListener(SFS2X.SFSEvent.LOGOUT, onLogout, this);
	
	// Logout
	sfs.send(new SFS2X.Requests.System.LogoutRequest());
}

function onLogout(evtParams)
{
	trace("Logout executed!");
}
See also:
SFS2X.SmartFox#send
SFS2X.SFSEvent.LOGOUT