I have some code like their example like so(untested as of yet)….
Promise<Object> promise = new Promise<Object>();
response.contentType = "application/json";
JsonStreamer streamer = new JsonStreamer(columns, promise);
while(streamer.hasMoreData()) {
await(promise);
response.writeChunk(streamer.nextDataChunk());
}
What I don’t get is how do I release the socket that the client opened? I am streaming some very large data back in json. I need some kind of response.releaseSocket() after writing the last chunk. I see WebSockets has that but what about when I am using the await stuff?
thanks,
Dean
ah, I think it is noticing I never called await and in that case closes the socket. If I call await, it knows to keep the socket open. That makes sense.