summaryrefslogtreecommitdiff
path: root/doc/session-overview.txt
blob: b8d731503e58eca72404835c391e9d4302dbb1f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Session API
***********


Connection management algorithm basics
======================================

When a session is created, a sorted list of services is added to the
session. The services are filtered and stable sorted according
following rules:

 - AllowedBearers (filter and sort)
 - RoamingPolicy (filter and sort)

A stable sorting algorithms maintains the relative order.

If a service is removed or added all sessions are updated according
the above rules.

There are three triggers which lead to evaluate the connect
algorithm:

 - Session.Connect()
 - PeriodicConnect
 - Offline

Connect algorithm:

              Session.Connect()     Offline
              PeriodicConnect        |
                       | Yes  +------+-------+  No
                       +------+StayConnected?+------ Do nothing
                       |      +--------------+
Session.Change() ------+
                       |
                +------+-------+
          +-----+EmergencyCall?+-----+
       Yes|     +--------------+     |No
          |                          |
        Connect to            +--------------+
        first available   +---+AvoidHandover?+---+
        Service           |   +--------------+   |
                       Yes|                      |No
                 +----------------+              |
             +---+In service_list +---+          |
          Yes|   |and online?     |   |No        |
             |   +----------------+   |          |
             |                        |          |
         Take that one                Take first in
                                      the service list

There are two triggers which lead to evaluate the disconnect
algorithm

 - Session.Disconnect()
 - IdleTimeout

Disconnect algorithm:

  Session.Disconnect()
  IdleTimeout
       |
       +--- Session.Change()
       |
+-----------------+    Yes
|service not used +-------------+
|by other session?|             |
+------.----------+             |
       |No                      |
       |                        |
    Service.Disconnect()   Do nothing