Logout

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Created page with "=Introduction= This is the logout process as initiated by a user quitting the viewer. = Logout = ==Key== {| border = "1" ! key !! description |- | GU || griduser service |...")
 
(Logout)
Line 4: Line 4:
  
 
= Logout =
 
= Logout =
 +
 +
==Notes==
 +
* 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==
 
{| border = "1"
 
{| border = "1"
Line 12: Line 17:
 
  | P  || presence service
 
  | P  || presence service
 
  |-
 
  |-
  | S   || simulator
+
  | R   || region occuped by the user's avatar
 
  |-
 
  |-
  | SCh || neighbour of simulator
+
  | RCh || neighbour of avatar region
 
  |-
 
  |-
  | SFr || simulator containing friend
+
  | RFr || region containing friend
 
  |-
 
  |-
 
  | V  || viewer
 
  | 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==
 
==Steps==
Line 25: Line 40:
 
The steps involving listeners are not exhausive.  Only the most significant operations are listed.
 
The steps involving listeners are not exhausive.  Only the most significant operations are listed.
  
* V->S, on user quit, viewer sends a '''LogoutRequest''' UDP packet to the simulator.
+
* V->R, on user quit, viewer sends a '''LogoutRequest''' UDP packet to the region.
* S, begins to tear down structures specific to the LL connection
+
* R->V, simulator immediate replies with a '''LogoutReply''' UDP packet.
* S, triggers '''IClientAPI.OnConnectionClosed''' event internally, causing listeners to  
+
* R, begins to tear down structures specific to the LL connection
** S->GU, tell the grid user service that the user has logged out.
+
* R, triggers '''IClientAPI.OnConnectionClosed''' event internally, causing listeners to  
** S->P, tell the presence service that the user has logged out.
+
** R->GU, tell the grid user service that the user has logged out.
* S, Tell the scene to start cleaning up its data structures (this is the bulk of the cleanup work).
+
** R->P, tell the presence service that the user has logged out.
** S->SCh, tell any neighbours to close their child agents for this viewer.
+
* R, Tell the scene to start cleaning up its data structures (this is the bulk of the cleanup work).
* S, triggers '''EventManager.OnClientClosed''' event internally, causing listeners to
+
** R->RCh, tell any neighbours to close their child agents for this viewer.
** S->SFr, tell regions containing friends that the user has gone offline.
+
*** RCh-V, these neighbours will in turn tell the viewer that the regions are closing (not actually necessary).
* S, triggers '''EventManager.OnRemovePresence''' event internally (this duplicates OnClientClosed and may be removed in the future).
+
* R, triggers '''EventManager.OnClientClosed''' event internally, causing listeners to
* S, derezzes the avatar's attachments, hence shutting down and saving any attachment script state.
+
** R->P, asks the presence service for which of the user's friends are online.
* S, tells other avatars still in the scene that the user has gone via the '''KillObject''' UDP packet.
+
** R->RFr, tell regions containing online friends that the user has gone offline.
* S, removes the scene presence and client structures and removes the avatar's physics object.
+
* 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.

Revision as of 13:22, 21 March 2013

Contents

Introduction

This is the logout process as initiated by a user quitting the viewer.

Logout

Notes

  • 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, 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.
Personal tools
General
About This Wiki