chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] reading available data from a port


From: felix winkelmann
Subject: Re: [Chicken-users] reading available data from a port
Date: Thu, 27 Dec 2007 23:52:14 +0100

On Dec 27, 2007 9:19 AM, minh thu <address@hidden> wrote:
>
>
> How do I get what is already present ?

There is currently no way, unless you work directly with file-
descriptors and file-read.

> Should I instead use read-token until I have all what I want ?

That would be a possibility, yes.

>
> 2/
> Actually, what is to be read from i in 1/ is something like <tag ...>.
> Note the ending </tag> will appear later after some enclosed elements.
> (This is an XML stream defined by XMPP core (rfc3920).)
> Is it possible to use SSAX to read just an opening tag ?

This should be possible, but I have no experience with SSAX, so perhaps
someone who has can give a hint.

Normally, you should be able to assume that you can read a complete
XML element, or not? I'm no XMPP expert, but if the format is XML, you
should be able to simply read complete elements and perhaps use
multithreading and tcp read/write timeouts to handle incomplete
data (if that is what you are trying to do here).

>
> Thanks a lot and merry christmas !

Thanks, and merry christmas to you too. :-)


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]