Пример #1
0
 public XmppSeverConnection()
 {
     streamParser = new StreamParser();
     streamParser.OnStreamStart		+= new StreamHandler(streamParser_OnStreamStart);
     streamParser.OnStreamEnd		+= new StreamHandler(streamParser_OnStreamEnd);
     streamParser.OnStreamElement	+= new StreamHandler(streamParser_OnStreamElement);
 }
Пример #2
0
 public XmppSeverConnection()
 {
     m_StreamParser = new StreamParser();
     m_StreamParser.OnStreamStart += new StreamHandler(StreamParser_OnStreamStart);
     m_StreamParser.OnStreamEnd += new StreamHandler(StreamParser_OnStreamEnd);
     m_StreamParser.OnStreamElement += new StreamHandler(StreamParser_OnStreamElement);
     m_StreamParser.OnStreamRead += new streamRead(m_StreamParser_OnStreamRead);//gt
 }
 protected override void parseHistoryItem(MemoryStream stream, JabberWire wire)
 {
     var parser = new StreamParser();
     parser.OnStreamElement += ((_sender, node) => { 
                                    elements.Add((Element)node);
                                });
     parser.Push(stream.GetBuffer(), 0, (int)stream.Length);
     parser.Push(closeTag, 0, closeTag.Length);
 }
Пример #4
0
        public XmppConnection()
        {
            InitSocket();
            // Streamparser stuff
            m_StreamParser = new StreamParser();

            m_StreamParser.OnStreamStart		+= new StreamHandler(StreamParserOnStreamStart);
            m_StreamParser.OnStreamEnd			+= new StreamHandler(StreamParserOnStreamEnd);
            m_StreamParser.OnStreamElement		+= new StreamHandler(StreamParserOnStreamElement);
            m_StreamParser.OnStreamError		+= new StreamError	(StreamParserOnStreamError);
            m_StreamParser.OnError              += new ErrorHandler (StreamParserOnError);
        }
Пример #5
0
 /// <summary>
 /// This method is intended to be called ONLY by windows level automation emulating Jabber service.  
 /// Don't use it to pass XML back and forth as strings.  I'll find you.
 /// </summary>
 /// <param name="stream"></param>
 public virtual void ParseInjectedStream(string stream, Action<Element> action)
 {
     var parser = new StreamParser();
     parser.OnStreamElement += new StreamHandler((_sender, node) => action((Element)node));
     parser.Push(Encoding.UTF8.GetBytes(stream), 0, stream.Length);
 }