public XmppSeverConnection() { streamParser = new StreamParser(); streamParser.OnStreamStart += new StreamHandler(streamParser_OnStreamStart); streamParser.OnStreamEnd += new StreamHandler(streamParser_OnStreamEnd); streamParser.OnStreamElement += new StreamHandler(streamParser_OnStreamElement); }
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); }
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); }
/// <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); }