Chapter 6. Sessions

A session is established between a client application and a service. A session is used to transfer secrets between the client application and the service.

A session is established by calling the service's OpenSession() method. Once established, a session is bound to calling application's connection to the DBus session bus.

A session is closed when the client application disconnects from the DBus session bus. Alternatively the client application can call the Close() method on the session interface. Once a session is closed all session specific negotiations will be dropped by the service.

More than one session may opened by a client application, although this is not normally necessary.

On the client side, a session should be treated as thread-local and not be shared among multiple threads. This allows all the operations on the session to be processed in order on the server side.