use this class to write components that connect to a Jabebr/XMPP server

http://www.xmpp.org/extensions/xep-0114.html

Inheritance: XmppConnection
Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            // create a new component connection to the given serverdomain, port and password
            // a password is needed for the most servers for security reasons, if your server runs behind
            // a firewall or a closed company network then you could allow component connections without password.
            comp = new XmppComponentConnection("localhost", 5555, "secret");

            // The Jid which this component will use
            comp.ComponentJid = new Jid("test.gnauck.dyndns.org");

            // Setup event handlers
            comp.OnLogin	+= new ObjectHandler(comp_OnLogin);
            comp.OnClose	+= new ObjectHandler(comp_OnClose);
            comp.OnRoute	+= new agsXMPP.XmppComponentConnection.RouteHandler(comp_OnRoute);
            comp.OnReadXml	+= new XmlHandler(comp_OnReadXml);
            comp.OnWriteXml	+= new XmlHandler(comp_OnWriteXml);

            comp.Open();

            Console.ReadLine();
            comp.Close();

            Console.ReadLine();

            Console.WriteLine("And open the Connection again");
            comp.Open();
            Console.ReadLine();

            comp.Close();

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        public IqGrabber(XmppComponentConnection conn)
        {
            m_connection = conn;
#if MONOSSL
            conn.OnIq += new agsXMPP.protocol.component.IqHandler(OnIqComponent);
#else
            conn.OnIq += new agsXMPP.protocol.component.IqHandler(OnIq);
#endif
        }
Ejemplo n.º 3
0
 public IqGrabber(XmppComponentConnection conn)
 {
     m_connection = conn;
     #if MONOSSL
     conn.OnIq += new agsXMPP.protocol.component.IqHandler(OnIqComponent);
     #else
     conn.OnIq += new agsXMPP.protocol.component.IqHandler(OnIq);
     #endif
 }
Ejemplo n.º 4
0
		static void Main(string[] args)
		{
            // create a new component connection to the given serverdomain, port and password
            // a password is needed for the most servers for security reasons, if your server runs behind
            // a firewall or a closed company network then you could allow component connections without password.
            comp = new XmppComponentConnection(HOST, PORT, SECRET);

            // The Jid which this component will use
			comp.ComponentJid = new Jid(JID);

            // Setup event handlers
			comp.OnLogin	+= new ObjectHandler(comp_OnLogin);
			comp.OnClose	+= new ObjectHandler(comp_OnClose);
			comp.OnRoute	+= new agsXMPP.XmppComponentConnection.RouteHandler(comp_OnRoute);			
			comp.OnReadXml	+= new XmlHandler(comp_OnReadXml);
			comp.OnWriteXml	+= new XmlHandler(comp_OnWriteXml);

            comp.OnMessage  += new MessageHandler(comp_OnMessage);
            comp.OnIq       += new IqHandler(comp_OnIq);
            comp.OnPresence += new PresenceHandler(comp_OnPresence);

            comp.OnAuthError += new XmppElementHandler(comp_OnAuthError);

			comp.Open();

			Console.ReadLine();
			comp.Close();
			
            //////Console.ReadLine();
			
            //////Console.WriteLine("And open the Connection again");
            //////comp.Open();
            //////Console.ReadLine();

            //////comp.Close();
			
            //////Console.ReadLine();
			
		}
Ejemplo n.º 5
0
 public IqGrabber(XmppComponentConnection conn)
 {
     m_connection = conn;
     conn.OnIq += new agsXMPP.protocol.component.IqHandler(OnIq);
 }
Ejemplo n.º 6
0
 public IqGrabber(XmppComponentConnection conn)
 {
     m_connection = conn;
     conn.OnIq   += new agsXMPP.protocol.component.IqHandler(OnIq);
 }
Ejemplo n.º 7
0
 public IqGrabber(XmppComponentConnection conn)
 {
     m_connection = conn;
     conn.OnIq += OnIq;
 }
Ejemplo n.º 8
0
 public IqGrabber(XmppComponentConnection conn)
 {
     m_connection = conn;
     conn.OnIq   += OnIq;
 }