Code review comment for lp:~michihenning/storage-framework/use-qiodevice

Revision history for this message
Michi Henning (michihenning) wrote :

I removed the stale file from the merge conflict and got rid of the redundant Q_INVOKABLE, thanks!

For the uploader, my thinking was that the caller should not write to the uploader until it enters the Ready state.

I need to check what happens if a write is done before then. I would expect the write to return an error seeing that underlying socket isn't connected at that point. (If that isn't the case, we can easily arrange for the write to return -1.)

I think forcing the caller to wait until the socket is ready is better than buffering the data. After all, the socket may not ever become ready due to an error (such as the server side going belly-up for some reason) and, if the client is allowed to write regardless, all the data just ends up piling up in memory.

« Back to merge proposal