我想用烧瓶从客户端读取大量数据(本质上是无限的)流。在URL的处理程序方法中,我想读取一些数据,然后在无限循环中生成。这会工作吗?烧瓶:如何读取流输入
为了澄清,我想要做一些事情如下:
@app.route("/spectrumdb/stream",methods=["POST"])
def datastream():
get the input stream of the request object.
Sit in an infinite loop, incrementally reading the input stream in chunks
and processing each chunk yeild the
interpreter after each chunk is processed.
预先感谢您的答复。
朗高
你的问题是不明确的可能是你可以检查这http://www.html5rocks.com/en/tutorials/eventsource/basics/你可以产生的结果作为响应http://stackoverflow.com/questions/12232304/how-to-implement-server-push-in-烧瓶架构 – Nava
@nava问题中不清楚的是什么?也许答案不是微不足道的,但这个问题似乎对我很好。 –
@JanVlcinsky这个问题似乎是通用的。我们可以给出什么类型的具体答案? – Nava