Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Conversation

@Waidhoferj
Copy link
Collaborator

Added simple collaborative drawing example to a new examples folder.

@Waidhoferj Waidhoferj added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 6, 2022
@Waidhoferj Waidhoferj self-assigned this Sep 6, 2022
@davidbrochart
Copy link
Collaborator

Don't you want to use https://github.com/y-crdt/ypy-websocket for that?

@Waidhoferj
Copy link
Collaborator Author

@davidbrochart that was my original idea, but I ran into an error that I couldn't debug. We could figure out the issue and replace the websocket logic.

The error involved a buffer read that expected 2 bytes and received 0.

@davidbrochart
Copy link
Collaborator

The error involved a buffer read that expected 2 bytes and received 0.

Difficult to see where it could come from, but if you still have the code it would be interesting to open an issue with it.

@Waidhoferj
Copy link
Collaborator Author

Sounds good, I'll create a minimal example and post an issue to the ypy-websocket repository.

Comment on lines 31 to 32
if update != b'\x00\x00':
self.send_q.put_nowait(update)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Horusiath I noticed that the observe_after_transaction is running in a tight loop with an empty update message when nothing has changed. Is this happening due read-only transaction operations in the draw() loop that don't change the state?

@Waidhoferj Waidhoferj merged commit d3387a5 into main Sep 13, 2022
@Waidhoferj Waidhoferj deleted the websocket-example branch September 13, 2022 05:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants