Exemplo n.º 1
0
 public void AddSession(Session s)
 {
     this._sessions.Add (s);
 }
Exemplo n.º 2
0
        public void ClientThread()
        {
            Communicator c = (Communicator)this._connectionqueue.Dequeue ();
            c.SetValueManager (this._vm);
            Session s = new Session (c, this._vm.StringKey);
            this._sm.AddSession (s);

            bool threadStarted = true;
            Telegram t = null;

            while (threadStarted) {
                t = c.LastTelegram;
                if (t != null) { // Telegram in queue
                    Console.WriteLine (t.ToString ());
                }
            }
        }