예제 #1
0
        public void TestInvite()
        {
            XMPPClient ObjXmppClient = new XMPPClient();

            //initializing the xmpp client with credentials
            ObjXmppClient.JID            = "*****@*****.**";
            ObjXmppClient.Password       = "******";
            ObjXmppClient.Server         = "54.173.99.54";
            ObjXmppClient.AutoReconnect  = true;
            ObjXmppClient.RetrieveRoster = true;
            ObjXmppClient.PresenceStatus = new PresenceStatus()
            {
                PresenceType = PresenceType.available, IsOnline = true
            };
            ObjXmppClient.AutoAcceptPresenceSubscribe = true;
            ObjXmppClient.AttemptReconnectOnBadPing   = true;
            //
            XMPPConnection ObjXmppCon = new XMPPConnection(ObjXmppClient);

            ObjXmppCon = new XMPPConnection(ObjXmppClient);
            ObjXmppCon.Connect();
            ObjXmppClient.Connect();
            //muc manager test
            MucManager mucManager = new MucManager(ObjXmppClient);
            JID        roomJID    = "*****@*****.**";

            mucManager.EnterRoom(roomJID, "XMPPTestNickName");
            JID to = "*****@*****.**";

            mucManager.DirectInvite(to, roomJID);
        }
 public void StartSellingItem()
 {
     _connection.Connect();
     _connection.Login(string.Format(ITEM_ID_AS_LOGIN, _itemId), AUCTION_PASSWORD, AUCTION_RESOURCE);
     //_connection.ChatManager.ChatCreated += new EventHandler(FakeAuctionServer_ChatCreated);
     _connection.ChatManager.ChatCreated += ChatManager_ChatCreated;
 }
예제 #3
0
        private static XMPPConnection ConnectTo(String hostname, String username, String password)
        {
            XMPPConnection connection = XMPPConnection.CreateXMPPConnection(hostname);

            connection.Connect();
            connection.Login(username, password, AUCTION_RESOURCE);

            return(connection);
        }
예제 #4
0
        public void TestConnection()
        {
            XMPPClient xmppClient = new XMPPClient();

            xmppClient.UserName = "******";
            xmppClient.JID      = "*****@*****.**";
            xmppClient.Server   = "192.168.1.29s";
            xmppClient.Password = "******";

            XMPPConnection xmppConnection   = new XMPPConnection(xmppClient);
            bool           connectionStatus = xmppConnection.Connect();
            //Assert.Equals(connectionStatus, true);
        }