Пример #1
0
        public XmppChat ConnectToChat(int chatId, string user)
        {
            lock (_activeChats)
            {
                var chat = new XmppChat(chatId, user, this);
                _activeChats.Add(chat);

                return(chat);
            }
        }
Пример #2
0
        private static void Main(string[] args)
        {
            _server = new XmppServer();
            _server.Start();

            if (args.Length > 0 && args[0] == "emulate")
            {
                var connection = new XmppConnection();
                connection.CreateChat(11);
                _chat = connection.ConnectToChat(11, "Some user");
            }

            Console.ReadLine();
        }