Git Product home page Git Product logo

Comments (6)

ciprianmacovei avatar ciprianmacovei commented on May 25, 2024
Screenshot 2023-12-14 at 15 16 16 Screenshot 2023-12-14 at 15 16 22

from socket.io-client.

darrachequesne avatar darrachequesne commented on May 25, 2024

Hi!

socket.to() and io.of() are available on the server side, not the client side.

Reference: https://socket.io/docs/v4/server-api/

from socket.io-client.

ciprianmacovei avatar ciprianmacovei commented on May 25, 2024

thank u for answering :) im using python on the server side, okey so yeah from the server side I know how to do it, but from client side how can I pick a namespace and a room ? is there something I'm missing. Because I was looking at https://socket.io/docs/v4/namespaces/ and there was nothing mentioning it s server side. Am I understanding it correctly ?
thank u for ur pacience

from socket.io-client.

ciprianmacovei avatar ciprianmacovei commented on May 25, 2024

because on python i have the emit function with kwargs and have room , namespace but in client ... i have only emit with first arg event name and second the data I'm sending :-?

from socket.io-client.

ciprianmacovei avatar ciprianmacovei commented on May 25, 2024

so for u to understand my flow:
every time a user logs in he makes a emit on the connected event and then from the server side i join him on the notifications namespace and a specific room, somehome there must me o possibility to send data only to that specific room, and listen to that specific room, something opposite to broadcast, how can i make this ?
ps: be is fully functional, I don't know how to do it from client

from socket.io-client.

ciprianmacovei avatar ciprianmacovei commented on May 25, 2024

i think i understand so the be is the source of truth, so when I say send it to room = x on the client when I listen it will send only to the rooms that I joined from the be

from socket.io-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.