sync method

Future<void> sync(
  1. String path,
  2. Uint8List data
)

Implementation

Future<void> sync(String path, Uint8List data) async {
  final normalizedPath = _normalizeSyncPath(path);
  if (!_connectedDocuments.containsKey(normalizedPath)) {
    throw RoomServerException("attempted to sync to a document that is not connected");
  }
  final streamState = _documentStreams[normalizedPath];
  if (streamState == null) {
    throw RoomServerException("attempted to sync to a document that is not connected");
  }
  streamState.queueSync(data);
}