gm2
[Top][All Lists]
Advanced

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

Re: [Gm2] IOChan.RawRead() returns fewer bytes than available


From: Gaius Mulley
Subject: Re: [Gm2] IOChan.RawRead() returns fewer bytes than available
Date: Thu, 25 Feb 2010 18:03:52 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

"Breeden, Thomas (tmb)" <address@hidden> writes:

> ISO sez:
>
> IOResult.ReadResult(cid: IOChan.ChanId):ReadResults
>
> after an RawIO.Read()
>
> will return one of these three ReadResults:
>
>    allRight       if items are read for all components;
>    wrongFormat    if some items are read, but not for all components;
>    endOfInput     if no items are read, the input having ended.
>
> so it appears that a short read is accommodated, but it must be up to
> the program to determine what it might mean.
>
> regards,

Hi Tom,

thanks for pointing this out - I missed it.  So a short raw read
should return wrongFormat.  I'll fix this accordingly, currently
rawread will perform multiple low level reads to satisfy one RawRead.

But it seems that if the low level read returns -1 then RawRead should
set wrongFormat and set the actual number of LOCs read,

regards,
Gaius




reply via email to

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