Packagecom.smartfoxserver.v2.requests
Classpublic class LogoutRequest
InheritanceLogoutRequest Inheritance com.smartfoxserver.v2.requests.BaseRequest

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.

View the examples

See also

logout event


Public Methods
 MethodDefined By
  
Creates a new LogoutRequest instance.
LogoutRequest
Constructor Detail
LogoutRequest()Constructor
public function LogoutRequest()

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

See also

Examples
The following example performs a logout from the current Zone:
     
     private function someMethod():void
     {
         sfs.addEventListener(SFSEvent.LOGOUT, onLogout);
         
         // Logout
         sfs.send(new LogoutRequest());
     }
     
     private function onLogout(evt:SFSEvent):void
     {
         trace("Logout executed!");
     }