This makes ClientSocket independent of the track-order in the SyncDocument, and makes it easier to understand quite a bit of the logic.
Rename NetworkSocket to ClientSocket, and put the client-specific functionality in it.