Jussi Kukkonen wrote:
Patrick Ohly wrote:
> However, this is unrelated to Jussi's problem. None of the tests check
> for StatusChanged. The question is: what is the correct way of waiting
> for a session to be ready for use?
Argh, forgot to answer this...
In my opinion the correct way depends on what you are after:
1. If you are interested in a particular session, then it makes sense to
use Session.StatusChanged and Session.GetStatus -- using
Server.SessionChanged and checking the path by hand is possible, but not
as clean. In a proper app you'd need to monitor status changes anyway
because who knows when "idle" turns to something else...
2. If you want to monitor all sessions, then you need to first use
Server.SessionChanged and Server.GetSessions and then
Session.StatusChanged and Session.GetStatus on the sessions you get.
- Jussi