Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help for implemeting a real-time chat #145

Open
jianuovidiu opened this issue Jul 14, 2022 · 1 comment
Open

Need help for implemeting a real-time chat #145

jianuovidiu opened this issue Jul 14, 2022 · 1 comment

Comments

@jianuovidiu
Copy link

Hi,

I am new to socketcluster and I am trying to figure out how to use it. I would like to create a real-time chat with nodejs socketcluster but I am not able to find any documentation on it regarding how to emit messages from client to server and viceversa.

Any help will be highly apprectiated.

Thank you.

@jondubois
Copy link
Member

jondubois commented Jul 17, 2022

This page shows how to do it: https://socketcluster.io/docs/basic-usage/

You just set up a for await of loop with a receiver on one side (server or client) and use socket.transmit(receiverName, data) on the other side. The API is the same on client and server. Either can be transmitter or receiver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants