예제 #1
0
        public Session(GJTalkServer server, Socket socket)
        {
            this.server = server;
            this.socket = socket;
            // server.SessionManager.Add(this);
            readCallback = new AsyncCallback(OnRead);

            buffer = new byte[buff_size];
            streamParser = new XmppStreamParser();
            streamParser.OnError += streamParser_OnError;
            streamParser.OnStreamElement += streamParser_OnStreamElement;
            streamParser.OnStreamEnd += streamParser_OnStreamEnd;
            streamParser.OnStreamStart += streamParser_OnStreamStart;
            BeginRead();
            Roster = new Xmpp.Roster.Roster();
            Groups = new List<BuddyGroup>();
            Console.WriteLine("New Session");
        }
예제 #2
0
        public Session(GJTalkServer server, Socket socket)
        {
            this.server = server;
            this.socket = socket;
            // server.SessionManager.Add(this);
            readCallback = new AsyncCallback(OnRead);

            buffer                        = new byte[buff_size];
            streamParser                  = new XmppStreamParser();
            streamParser.OnError         += streamParser_OnError;
            streamParser.OnStreamElement += streamParser_OnStreamElement;
            streamParser.OnStreamEnd     += streamParser_OnStreamEnd;
            streamParser.OnStreamStart   += streamParser_OnStreamStart;
            BeginRead();
            Roster = new Xmpp.Roster.Roster();
            Groups = new List <BuddyGroup>();
            Console.WriteLine("New Session");
        }
예제 #3
0
        static void Main(string[] args)
        {
            SetEnv();

            Console.WriteLine("Check if mongoDB is online...");
            if (!MongoDbHelper.IsOnline())
            {
                Console.WriteLine("mongoDB isn't online.");
                Console.WriteLine("Starting mongoDB.");
                MongoDbHelper.CheckAndRun();
            }
            else
            {
                Console.WriteLine("mongoDB is online.");
            }

            new Test().Start();
            server = new GJTalkServer();
            server.Start();
            Console.WriteLine("Started.");
            new Thread(Empty).Start();
            CommandLine();
        }
예제 #4
0
        static void Main(string[] args)
        {
            SetEnv();

            Console.WriteLine("Check if mongoDB is online...");
            if (!MongoDbHelper.IsOnline())
            {
                Console.WriteLine("mongoDB isn't online.");
                Console.WriteLine("Starting mongoDB.");
                MongoDbHelper.CheckAndRun();
            }
            else
            {
                Console.WriteLine("mongoDB is online.");
            }

            new Test().Start();
            server = new GJTalkServer();
            server.Start();
            Console.WriteLine("Started.");
            new Thread(Empty).Start();
            CommandLine();
        }
예제 #5
0
 public MessageMangaer(GJTalkServer server)
 {
     this.server = server;
 }
예제 #6
0
 public MessageMangaer(GJTalkServer server)
 {
     this.server = server;
 }
예제 #7
0
 public SessionManager(GJTalkServer server)
 {
     this.server = server;
 }
예제 #8
0
 public SessionManager(GJTalkServer server)
 {
     this.server = server;
 }