Git Product home page Git Product logo

Comments (6)

suzanshakya avatar suzanshakya commented on July 20, 2024

Why the chat.py is not working yet?

from gevent-socketio.

dmfrancisco avatar dmfrancisco commented on July 20, 2024

@suzanshakya I'm also trying to run the examples. I had to change this in the chat.py file:

self.emit_to_room('msg_to_room', msg, 'main_room')

To this:

self.emit_to_room('main_room', 'msg_to_room', msg)

I'm using the version 0.3.5 beta (although the init file says it's version 0.3.1).
Hope this helps.

from gevent-socketio.

suzanshakya avatar suzanshakya commented on July 20, 2024

@dmfrancisco Thanks, that worked but own message is displayed twice as 'me' and given nickname.
@dkoneill Thanks. That works like a charm.

from gevent-socketio.

dmfrancisco avatar dmfrancisco commented on July 20, 2024

@suzanshakya Yes, there is a broadcast_event_not_me method (which broadcasts to everyone except itself) but there isn't a emit_to_room_not_me method. However, it's simple to extend the default RoomsMixin and add such method. Here is how I've done it: https://gist.github.com/951e149d62b048e9e468
Hope this helps.

EDIT: I had not seen @dkoneill commit. It seems the issue is solved :)

from gevent-socketio.

suzanshakya avatar suzanshakya commented on July 20, 2024

@dmfrancisco That seems to work. But I'll settle with @dkoneill commit for now.

from gevent-socketio.

philipn avatar philipn commented on July 20, 2024

This looks fixed. Can we close?

from gevent-socketio.

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.