On 20 Jul 2010, at 12:19, Mircea Markus wrote:
>
> What if the field was missing?
I don't know how can we read the optional field form the socket: we read it byte by
byte, so if a byte is missing we block on read. Something like InputStream.available()
would be useful, but even that one returns "an *estimate* of the number of bytes that
can be read" - so it's not "good enough".
Ah yes, what I meant was the field is unset. E.g., contains a 0 or a -1 as a tx id which
assumes either no tx in progress or a client that doesn't support txs.
So I presume this was to optimise away the extra, unset field? How big is this field
anyway?
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org