Subject: Using agsXMPP.protocol.stream in server
Hello! I have three questions for you.
1) sample server has this code:
if i rewrite it using agsXMPP.protocol.stream.Stream, like
the XML dump differs from something like
2) Second question is: Where and how I must send "stream:features" to client?
BTW, if I using class using agsXMPP.protocol.stream.feature.Features i have the same problem, like in list-item 1 (tag features instead stream:features)
3) What I should do to turn-on SASL/TLS steam encryption?
Thank you.
1) sample server has this code:
private void SendOpenStream()
{
this.SessionId = agsXMPP.SessionId.CreateNewId();
StringBuilder sb = new StringBuilder();
sb.Append( "<stream:stream from='");
sb.Append( "localhost );
sb.Append( "' xmlns='" );
sb.Append( agsXMPP.Uri.CLIENT );
sb.Append( "' xmlns:stream='" );
sb.Append( agsXMPP.Uri.STREAM );
sb.Append( "' id='" );
sb.Append( this.SessionId );
sb.Append( "'>" );
Send( sb.ToString() );
}
{
this.SessionId = agsXMPP.SessionId.CreateNewId();
StringBuilder sb = new StringBuilder();
sb.Append( "<stream:stream from='");
sb.Append( "localhost );
sb.Append( "' xmlns='" );
sb.Append( agsXMPP.Uri.CLIENT );
sb.Append( "' xmlns:stream='" );
sb.Append( agsXMPP.Uri.STREAM );
sb.Append( "' id='" );
sb.Append( this.SessionId );
sb.Append( "'>" );
Send( sb.ToString() );
}
if i rewrite it using agsXMPP.protocol.stream.Stream, like
agsXMPP.protocol.stream.Stream s = new agsXMPP.protocol.stream.Stream();
s. From = new Jid("localhost");
this.SessionId = agsXMPP.SessionId.CreateNewId();
s.StreamId = this.SessionId;
Send(s);
s. From = new Jid("localhost");
this.SessionId = agsXMPP.SessionId.CreateNewId();
s.StreamId = this.SessionId;
Send(s);
the XML dump differs from something like
to something like that<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' from='myjabber.net' id='1075705237'>
Can I use this class for forming stream?<stream xmlns='jabber:client' xmlns='http://etherx.jabber.org/streams' from='myjabber.net' id='1075705237'>
2) Second question is: Where and how I must send "stream:features" to client?
BTW, if I using class using agsXMPP.protocol.stream.feature.Features i have the same problem, like in list-item 1 (tag features instead stream:features)
3) What I should do to turn-on SASL/TLS steam encryption?
Thank you.
IrQ
Show profile
Link to this post
