Beispiel #1
0
 public Client()
 {
     Xmpp = new XmppClientConnection("skylabsonline.com");
     Xmpp.OnRegistered += XmppOnOnRegistered;
     Xmpp.OnRegisterError += XmppOnOnRegisterError;
     Xmpp.OnXmppConnectionStateChanged += XmppOnOnXmppConnectionStateChanged;
     Xmpp.OnLogin += XmppOnOnLogin;
     Xmpp.OnAuthError += XmppOnOnAuthError;
     Xmpp.OnRosterItem += XmppOnOnRosterItem;
     Xmpp.OnRosterEnd += XmppOnOnRosterEnd;
     Xmpp.OnRosterStart += XmppOnOnRosterStart;
     Xmpp.OnMessage += XmppOnOnMessage;
     Xmpp.OnPresence += XmppOnOnPresence;
     Xmpp.OnAgentItem += XmppOnOnAgentItem;
     Xmpp.OnIq += XmppOnOnIq;
     Xmpp.OnReadXml += XmppOnOnReadXml;
     Notifications = new List<Notification>();
     Friends = new List<NewUser>();
     //GroupChats = new List<NewUser>();
     myPresence = new Presence();
     Chatting = new Chat(this,Xmpp);
     CurrentHostedGamePort = -1;
     _games = new List<HostedGameData>();
     agsXMPP.Factory.ElementFactory.AddElementType("gameitem", "octgn:gameitem", typeof(HostedGameData));
 }
Beispiel #2
0
 private void RebuildXmpp()
 {
     if(Xmpp != null)
     {
         Xmpp.OnXmppConnectionStateChanged -= XmppOnOnXmppConnectionStateChanged;
         Xmpp.Close();
         Xmpp = null;
     }
     DisconnectedBecauseConnectionReplaced = false;
     Xmpp = new XmppClientConnection(Host);
     Xmpp.OnRegistered += XmppOnOnRegistered;
     Xmpp.OnRegisterError += XmppOnOnRegisterError;
     Xmpp.OnXmppConnectionStateChanged += XmppOnOnXmppConnectionStateChanged;
     Xmpp.OnLogin += XmppOnOnLogin;
     Xmpp.OnAuthError += XmppOnOnAuthError;
     Xmpp.OnRosterItem += XmppOnOnRosterItem;
     Xmpp.OnRosterEnd += XmppOnOnRosterEnd;
     Xmpp.OnRosterStart += XmppOnOnRosterStart;
     Xmpp.OnMessage += XmppOnOnMessage;
     Xmpp.OnPresence += XmppOnOnPresence;
     Xmpp.OnAgentItem += XmppOnOnAgentItem;
     Xmpp.OnIq += XmppOnOnIq;
     Xmpp.OnReadXml += XmppOnOnReadXml;
     Xmpp.OnClose += XmppOnOnClose;
     Xmpp.OnWriteXml += XmppOnOnWriteXml;
     Xmpp.OnError += XmppOnOnError;
     Xmpp.OnSocketError += XmppOnOnSocketError;
     Xmpp.OnStreamError += XmppOnOnStreamError;
     Notifications = new List<Notification>();
     Friends = new List<NewUser>();
     //GroupChats = new List<NewUser>();
     myPresence = new Presence();
     Chatting = new Chat(this, Xmpp);
     CurrentHostedGamePort = -1;
     _games = new List<HostedGameData>();
     agsXMPP.Factory.ElementFactory.AddElementType("gameitem", "octgn:gameitem", typeof(HostedGameData));
 }