oboe.js icon indicating copy to clipboard operation
oboe.js copied to clipboard

how to abort the streaming request?

Open hoogw opened this issue 6 years ago • 1 comments

I know that oboe(url).node(0.done() can streaming json when stream ended, done(function(){}) was called.

I have need to abort this streaming before it done().

for example fetch.abort api

use controller.abort(); abort signal.

Would oboe have such similar, so I can oboe.abort() or controller.abort()..... or what ever I can abort the stream before it fire .done() ?

hoogw avatar Jan 15 '20 16:01 hoogw

oboe use xhr, should have abort function, like xhr.abort ... or fetch abort etc...

90% of my mapping web page, need to abort ajax, abort fetch etc... because otherwise, when user pan the map, continuously, each pan/zoom map will fire a stream request, so a chain of streaming request piled up, user have to wait long time until all other stream ended one by one to get the latest usefull stream started, it is horrible user experience. We want abort all other stream, only keep the latest stream live.

Please advise how to abort stream before it ended?

hoogw avatar Jan 15 '20 18:01 hoogw