Refactor acknowledging requests from server

See the corresponding server commit for details.