Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Coupling with Socket.io #90

Open
devniz opened this issue Jun 30, 2020 · 5 comments
Open

Coupling with Socket.io #90

devniz opened this issue Jun 30, 2020 · 5 comments
Labels
question Further information is requested

Comments

@devniz
Copy link

devniz commented Jun 30, 2020

Great React Lib, thank you,

By using the Save & Load functionnalities, is it possible to capture the string data of the drawing on save and then push it via socket.io to load it for multiple clients? Think of collaborative whiteboard, I am definitely going to try it out but not entirely sure about the performance for real-time drawing.

@mkvalluri
Copy link

I think this should work as I am doing something similar for a game that I am on working on. Will update this thread once I am done with my change.

@kothariji
Copy link

I think this should work as I am doing something similar for a game that I am on working on. Will update this thread once I am done with my change.

@mkvalluri @NizarBsb can you please tell me guys, if it supports Socket,io or not.

@devniz
Copy link
Author

devniz commented Nov 24, 2020

@kothariji Yes, I made it working with socket.io version ^2.3.0. However it is not going to be streamed, i.e don't expect to have a live gesture drawing from the remote, it is going to take few milliseconds to refresh and then show the result. I may have done a very bad implementation but since we are saving -> push to socket.io then re-drawing the saved drawing object, this is the expected result.

@kothariji
Copy link

@kothariji Yes, I made it working with socket.io version ^2.3.0. However it is not going to be streamed, i.e don't expect to have a live gesture drawing from the remote, it is going to take few milliseconds to refresh and then show the result. I may have done a very bad implementation but since we are saving -> push to socket.io then re-drawing the saved drawing object, this is the expected result.

Oh, Nice. Hey buddy can you help me a little bit. Actually, i am a beginner in react and I was working on basic socket.io implementation, I was successful in making chat app, but I am not able to implement socket-io with react-canvas-draw. (My code is going in a loop) Can you please help me walk through with basic implementation of socket-io with react-canvas-draw? Thanks in Advance. 🙏

@atharva-bhange
Copy link

@kothariji Yes, I made it working with socket.io version ^2.3.0. However it is not going to be streamed, i.e don't expect to have a live gesture drawing from the remote, it is going to take few milliseconds to refresh and then show the result. I may have done a very bad implementation but since we are saving -> push to socket.io then re-drawing the saved drawing object, this is the expected result.

@NizarBsb So like when you save the drawing on one end and then send the saved data through a socket it redraws the whole thing in sequence every time a new save has been received. So it is not real time right?

@embiem embiem added the question Further information is requested label Nov 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants