Justin Karneges wrote:
> I think the original intent with XTLS was to use a new parser instance for 
> the 
> content of each TLS packet, but this violates the TLS abstraction.  

My original intent was to open a new stream incl. feature handling. I
implemented that and therefor never had the missing root element
problem.

> Treated as a stream, we cannot enforce that a particular TLS packet
> contains an entire XML document.  A single TLS packet might contain
> many messages, and one message might be split across many TLS
> packets.
>
> Better that we change the stream to work like this:
>
>   [ immediate TLS handshake ]
>   <some_root_element>
>     <message/>
>     <message/>
>     <message/>
>   </some_root_element>

If you want that only to re-use your parser, it is an implementation
problem. To re-use a parser just feed <some_root_element> to your
parser manually. If you are doing it because it matches the XMPP style
with one large XML document we should go for <stream>. I'm happy with
both because, but we should NOT wait for the <stream> from the peer
because it would add an extra roundtrip.


Dirk

-- 
UNIX _is_ user friendly - it's just selective about who its friends are!

Reply via email to