I am using a mudguard 1.2.1.
I transfer large files from / to the repository, I use both chunked requests and chunked answers for this.
For chunk requests, I use the built-in ack mechanism for my actor to make sure each fragment is written before sending more:
connection ! MessageChunk(data).withAck(ChunkSent)
connectionis an IO actor provided by Spray and Akka, then I can wait ChunkSentbefore sending the next snippet. Good.
I'm struggling to reproduce the same behavior with alternating answers. I can send mine HttpRequestand then receive ChunkedResponseStart, and then a bunch, MessageChunkand finally, ChunkedMessageEndbut is there a way to make Spray wait for me to send ack after each MessageChunkbefore sending the next one?
Edit: just to be a little clearer: I use a spray can as a client in this case, I am not a server, the server is the repository I mentioned earlier.
source
share