3.3.4.5 AsyncPoll Completes
Upon successful completion the server has responded to a previous call by the client to the RequestVersionVector method for a particular replicated folder.
Actions Triggered: The client MUST register another AsyncPoll callback for the connection on which the AsyncPoll method completed.
Subsequent actions are dependent on the type of version vector request that triggered this AsyncPoll completion.
REQUEST_NORMAL_SYNC: If the client’s replicated folder session state is currently Requesting Version Vector, then the AsyncPoll completion indicates that the server’s version vector has changed to contain versions that are not known to the client. The client MUST request the changed version vector from the server by calling the RequestVersionVector method with the changeType parameter equal to CHANGE_ALL and then MUST enter the Poll Again replicated folder session state.
If the client’s replicated folder session state is currently Poll Again then the AsyncPoll completion indicates that the server has sent its version chain vector to the client. The client MUST enter the Requesting Updates replicated folder session state. The client MUST then request updates pertaining to the version chain vector received from the server. The client uses calls to the RequestUpdates method to retrieve updates from the server.
If the client’s replicated folder session state is neither Requesting Version Vector nor Poll Again, then the client MUST ignore the reply from the server.
REQUEST_SLOW_SYNC: If the client's slow sync state is currently Requesting Version Vector then the client MUST transition to the Request Records slow sync state (see section 3.3.1.3) and MUST call the RequestRecords method to request the replicated folder's live update records from the server.
If the client’s slow sync state is not Requesting Version Vector then the client MUST ignore the response from the server.
Error Handling: The following table summarizes the set of errors returned by the AsyncPoll method upon invocation that cause a client to behave in specific ways. (This is the only asynchronous RPC call whose errors are handled differently during invocation and asynchronous completion).
|
Error code |
Client response |
|---|---|
|
0x00000000 ERROR_SUCCESS |
The client MUST perform the actions listed under the Actions Triggered heading. |
|
All non-zero error codes |
The client SHOULD try to call AsyncPoll again after a time-out interval of its choice. |
The following table summarizes the set of errors returned by the AsyncPoll method upon asynchronous completion that cause a client to behave in specific ways.
|
Error code |
Client response |
|---|---|
|
0x00000000 ERROR_SUCCESS |
The client MUST perform the actions listed under the Actions Triggered heading. |
|
All non-zero error codes |
The client MUST transition to the Disconnected connection state. The client SHOULD try to re-establish the connection by calling the EstablishConnection method after a time-out interval of its choice. |