221 |
point. */ |
point. */ |
222 |
assert (bd->size == 0); |
assert (bd->size == 0); |
223 |
|
|
224 |
/* This will work well in the server, because this call will |
/* On the server, this will do an unblocking read of as much data as is |
225 |
do an unblocked read and fetch all the available data. In |
* available. On the client, with a blocking input descriptor and the |
226 |
the client, this will read a single byte from the stdio |
* current fd_buffer implementation, this should read as much data as |
227 |
stream, which will cause us to call inflate once per byte. |
* is currently available, and at least 1 byte (or EOF), from the |
228 |
It would be more efficient if we could make a call which |
* underlying buffer. |
229 |
would fetch all the available bytes, and at least one byte. */ |
*/ |
|
|
|
230 |
status = (*cb->buf->input) (cb->buf->closure, bd->text, |
status = (*cb->buf->input) (cb->buf->closure, bd->text, |
231 |
need, BUFFER_DATA_SIZE, &nread); |
need ? 1 : 0, BUFFER_DATA_SIZE, &nread); |
232 |
|
|
233 |
if (status == -2) |
if (status == -2) |
234 |
/* Don't try to recover from memory allcoation errors. */ |
/* Don't try to recover from memory allcoation errors. */ |