Compare commits
1 Commits
v13.0.0-21
...
v13.0.0-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5844c810a2 |
@@ -9,7 +9,6 @@ Y({
|
||||
name: 'websockets-client',
|
||||
url: 'http://127.0.0.1:1234',
|
||||
room: 'html-editor-example6'
|
||||
// maxBufferLength: 100
|
||||
},
|
||||
share: {
|
||||
xml: 'XmlFragment()' // y.share.xml is of type Y.Xml with tagname "p"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yjs",
|
||||
"version": "13.0.0-21",
|
||||
"version": "13.0.0-20",
|
||||
"description": "A framework for real-time p2p shared editing on any data",
|
||||
"main": "./y.node.js",
|
||||
"browser": "./y.js",
|
||||
|
||||
@@ -213,7 +213,7 @@ export default function extendConnector (Y/* :any */) {
|
||||
self.broadcastOpBuffer = ops.slice(i)
|
||||
self.broadcast(encoder.createBuffer())
|
||||
if (i !== length) {
|
||||
self.whenRemoteResponsive().then(broadcastOperations)
|
||||
setTimeout(broadcastOperations, 100)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -225,20 +225,6 @@ export default function extendConnector (Y/* :any */) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Somehow check the responsiveness of the remote clients/server
|
||||
* Default behavior:
|
||||
* Wait 100ms before broadcasting the next batch of operations
|
||||
*
|
||||
* Only used when maxBufferLength is set
|
||||
*
|
||||
*/
|
||||
whenRemoteResponsive () {
|
||||
return new Promise(function (resolve) {
|
||||
setTimeout(resolve, 100)
|
||||
})
|
||||
}
|
||||
|
||||
/*
|
||||
You received a raw message, and you know that it is intended for Yjs. Then call this function.
|
||||
*/
|
||||
|
||||
18
y.node.js
18
y.node.js
@@ -1,7 +1,7 @@
|
||||
|
||||
/**
|
||||
* yjs - A framework for real-time p2p shared editing on any data
|
||||
* @version v13.0.0-21
|
||||
* @version v13.0.0-20
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
@@ -841,7 +841,7 @@ function extendConnector (Y/* :any */) {
|
||||
self.broadcastOpBuffer = ops.slice(i);
|
||||
self.broadcast(encoder.createBuffer());
|
||||
if (i !== length) {
|
||||
self.whenRemoteResponsive().then(broadcastOperations);
|
||||
setTimeout(broadcastOperations, 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -853,20 +853,6 @@ function extendConnector (Y/* :any */) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Somehow check the responsiveness of the remote clients/server
|
||||
* Default behavior:
|
||||
* Wait 100ms before broadcasting the next batch of operations
|
||||
*
|
||||
* Only used when maxBufferLength is set
|
||||
*
|
||||
*/
|
||||
whenRemoteResponsive () {
|
||||
return new Promise(function (resolve) {
|
||||
setTimeout(resolve, 100);
|
||||
})
|
||||
}
|
||||
|
||||
/*
|
||||
You received a raw message, and you know that it is intended for Yjs. Then call this function.
|
||||
*/
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user