The few words here say that when read is called it returns the characters that have been received but not yet consumed.
Then I pair that with the close function ... which is a callback event called when the partner has closed the connection. My assumption was that the data received but not yet consumed could be consumed at that time.
I am sensing that this is not a valid assumption ... and if that is the case, what I'd like to do is document that consideration so that future travelers won't be led down this path.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
What I'm trying to do is "play" end user. So I go to the API docs for
httpSRq
and found theread
function.http://www.espruino.com/Reference#l_httpSRq_read
The few words here say that when
read
is called it returns the characters that have been received but not yet consumed.Then I pair that with the
close
function ... which is a callback event called when the partner has closed the connection. My assumption was that the data received but not yet consumed could be consumed at that time.I am sensing that this is not a valid assumption ... and if that is the case, what I'd like to do is document that consideration so that future travelers won't be led down this path.