how does the client know the server has written all the data?