Since I also can't spend too long in the callback function, it makes sense to take a copy of the received data for subsequent processing.
And with that background ... here is my dilemma.
Imagine my partner is sending me data faster than I can process it. For example, if my partner is sending me 5K of data each 100msecs but I can only process 1K of data each 100msecs then I am going to be in trouble.
If I can't process the data at the rate my partner is sending, I somehow need to throttle the transmission rate. The question is ... how do I do that? Imagine I have no application level protocol control at the application level. What I feel I want to do is throttle the ability of the ESP8266 to say "Hey partner, I know you have data to send to me ... but keep it in your own buffers ... my buffers are full. I'll tell you when you can push more to me!".
Is such a thing possible?