Exemple #1
0
 public Actor NewActor(string url, ConnectionStateDelegate d = null)
 {
     if (url.StartsWith("http"))
     {
         return(new WebActor(url));
     }
     return(new Actor(url, d));
 }
Exemple #2
0
        static public void RemoveWatcher(string url, ConnectionStateDelegate d)
        {
            ConnectionStateDelegate tmp;

            if (watchers.TryGetValue(url, out tmp))
            {
                tmp -= d;
            }
        }
Exemple #3
0
 public Actor(string url, ConnectionStateDelegate d = null)
 {
     Parse(url);
     if (d == null)
     {
         d = DefaultConnectionWatcher;
     }
     _watcher = d;
     TransportManager.AddWatcher(URL, _watcher);
 }
Exemple #4
0
        static public void AddWatcher(string url, ConnectionStateDelegate d)
        {
            ConnectionStateDelegate tmp;

            if (watchers.TryGetValue(url, out tmp))
            {
                tmp += d;
            }
            else
            {
                watchers.Add(url, d);
            }
        }