コード例 #1
0
        public void Authenticate()
        {
            Register();
            var auth = GetAuthPacket();

            Stream.Send(auth);
        }
コード例 #2
0
        public void Discover()
        {
            Logger.Log("Discovering features");
            var iq = new IQ(IQType.Get)
            {
                To = Session.Account.Domain
            };

            iq.AddQuery("http://jabber.org/protocol/disco#info");

            Register(iq);
            Stream.Send(iq);
        }
コード例 #3
0
        public void Bind(string resource)
        {
            var packet = new Packet("resource")
            {
                Value = resource
            };

            var binder = new Packet("bind", "urn:ietf:params:xml:ns:xmpp-bind");

            binder.AddChild(packet);

            var iq = new IQ(IQType.Set);

            iq.AddChild(binder);

            Register(iq);
            Stream.Send(iq);
        }