yjs / y-websocket

Websocket Connector for Yjs
https://docs.yjs.dev/ecosystem/connection-provider/y-websocket
MIT License
497 stars 256 forks source link

[Question] Is there an event to identify that data has been uploaded to the server? #110

Closed lijie1129 closed 2 years ago

lijie1129 commented 2 years ago

My scenario: create a document locally, input some content, and then establish a connection through y-websocket to upload it to the server.

The question is: when to close this connection(wsProvider)?

I currently use setTimeout to destroy the wsProvider after 5 seconds. But I don't think it's elegant.

Huly®: YJS-523

dmonad commented 2 years ago

Please, questions go to discuss.yjs.dev