public override void WriteStartTag(Stream stream)
 {
     // We don't send the <stream:stream> tag in XEP 124.
     XEP124Socket mySock = ((XEP124Socket)Socket);
     mySock.NS = stream.NS;
     mySock.Write(null, 0, 0);
 }
Example #2
0
        /// <summary>
        /// Got the stream:stream.  Start the handshake.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="tag"></param>
        protected override void OnDocumentStart(object sender, System.Xml.XmlElement tag)
        {
            base.OnDocumentStart(sender, tag);
            if (this.Type == ComponentType.Connect)
            {
                lock (StateLock)
                {
                    State = HandshakingState.Instance;
                }

                Kixeye.Jabber.Protocol.Stream.Stream str = new Kixeye.Jabber.Protocol.Stream.Stream(this.Document, NS);
                str.To = this.ComponentID;
                this.StreamID = str.ID;
                if (ServerVersion.StartsWith("1."))
                    str.Version = "1.0";


                WriteStartTag(str);

                if (ServerVersion.StartsWith("1."))
                {
                    Features f = new Features(this.Document);
                    if (AutoStartTLS && !SSLon && (this[Options.LOCAL_CERTIFICATE] != null))
                        f.StartTLS = new StartTLS(this.Document);
                    Write(f);
                }
            }
        }
Example #3
0
 /// <summary>
 /// Sends a new XMPP stream header.
 /// </summary>
 protected void SendNewStreamHeader()
 {
     Kixeye.Jabber.Protocol.Stream.Stream str = new Kixeye.Jabber.Protocol.Stream.Stream(m_doc, NS);
     str.To = new JID((string)this[Options.TO]);
     str.Version = "1.0";
     m_stanzas.WriteStartTag(str);
     InitializeStream();
 }