On Tue, 4 Jan 2005 00:13, Heiner Wolf wrote:
> Hi,
>
> >        String s1 = "<?xml version=\"1.0\"?><str";
> >        String s2 = "eam><element>qwe</element></stream>";
>
> I wonder who would ever be interested in getting notification of a
> partial <stream> tag. This is a weird case and I suppose applications
> have no problem waiting for the "eam>".

The notification would be unnecessary.  The actual problem is that if you have 
to wait for the "eam>", you tie up a thread in your application which is 
handling the wait().  So whereas it's perfectly fine for a client connected 
to a single server, or even a component, a client which handled multiple 
connections would need one thread open per connection.  A server... well, 
that would be nuts.  1,000 connected clients and you already have 1,000 
threads open, which is less than practical in most cases. :-)

A parser which can parse only what is available can bypass these problems as 
you can have one thread using select() and handling every socket at the same 
time.

TX

-- 
             Email: Trejkaz Xaoza <[EMAIL PROTECTED]>
          Web site: http://xaoza.net/
         Jabber ID: [EMAIL PROTECTED]
   GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F  A62C B8C7 BC8B 037E EA73

Attachment: pgpkLzAPg4IJO.pgp
Description: PGP signature

_______________________________________________
jdev mailing list
[email protected]
http://mail.jabber.org/mailman/listinfo/jdev

Reply via email to