Initial support for sync

Only sends the sync, does not do anything with the response yet.
Handling the response will be implemented in the next several commits,
piece by piece.