Logout
From OpenSimulator
| Languages: | 
 
  | 
Contents | 
Introduction
This is the logout process as initiated by a user quitting the viewer.
Logout
Notes
- Many viewers will log out whether they receive logout confirmation from the simulator or not. On the Linden viewer 3.3.4, for example, quit will always happen after 6 seconds.
 - Logging back in whilst logout processing is still occuring will cause login to be delayed but it should succeed.
 
Key
| key | description | 
|---|---|
| GU | griduser service | 
| P | presence service | 
| R | region occuped by the user's avatar | 
| RCh | neighbour of avatar region | 
| RFr | region containing friend | 
| V | viewer | 
Communication
Communication occurs between:
- Viewer and region (V <-> R)
 - Region and grid user service (R -> GU)
 - Region and presence service (R -> P)
 - Region and neighbours (R -> RCh)
 - Neighbours and viewer (RCh -> V)
 - Region and other regions containing user's online friends (R -> RFr)
 
Steps
The steps involving listeners are not exhausive. Only the most significant operations are listed.
- V->R, on user quit, viewer sends a LogoutRequest UDP packet to the region.
 - R->V, simulator immediate replies with a LogoutReply UDP packet.
 - R, begins to tear down structures specific to the LL connection
 -  R, triggers IClientAPI.OnConnectionClosed event internally, causing listeners to 
- R->GU, tell the grid user service that the user has logged out.
 - R->P, tell the presence service that the user has logged out.
 
 -  R, Tell the scene to start cleaning up its data structures (this is the bulk of the cleanup work).
-  R->RCh, tell any neighbours to close their child agents for this viewer.
- RCh-V, these neighbours will in turn tell the viewer that the regions are closing (not actually necessary).
 
 
 -  R->RCh, tell any neighbours to close their child agents for this viewer.
 -  R, triggers EventManager.OnClientClosed event internally, causing listeners to
- R->P, asks the presence service for which of the user's friends are online.
 - R->RFr, tell regions containing online friends that the user has gone offline.
 
 - R, triggers EventManager.OnRemovePresence event internally (this duplicates OnClientClosed and may be removed in the future).
 - R, derezzes the avatar's attachments, hence shutting down and saving any attachment script state.
 - R, tells other avatars still in the scene that the user has gone via the KillObject UDP packet.
 - R, removes the scene presence and client structures and removes the avatar's physics object.