예제 #1
0
 public void AddSession(Session s)
 {
     this._sessions.Add (s);
 }
예제 #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 ());
                }
            }
        }