Git Product home page Git Product logo

Comments (13)

mscdex avatar mscdex commented on May 3, 2024

The "listeners" part comes from EventEmitter, which http.Server inherits from.

from socket.io.

martinklepsch avatar martinklepsch commented on May 3, 2024

@mscdex
okay found it.
Any idea why it does not work?

from socket.io.

mscdex avatar mscdex commented on May 3, 2024

not sure really. out of curiosity, what version of node are you using?

from socket.io.

martinklepsch avatar martinklepsch commented on May 3, 2024

0.1.96

from socket.io.

mscdex avatar mscdex commented on May 3, 2024

Maybe give the latest version of node a try? I'm not sure anything related to this would have changed since .96 though...

from socket.io.

martinklepsch avatar martinklepsch commented on May 3, 2024

Unfortunately this does not change anything.

TypeError: Cannot call method 'listeners' of undefined
at [object Object].init (/Users/martin/Projects/xrefresh2/vendor/Socket.IO-node/lib/socket.io/listener.js:28:31)

from socket.io.

martinklepsch avatar martinklepsch commented on May 3, 2024

My mistake.

from socket.io.

justincampbell avatar justincampbell commented on May 3, 2024

What was the resolution to this? I'm having the same problem. Node 0.1.101

from socket.io.

martinklepsch avatar martinklepsch commented on May 3, 2024

Sorry for not posting the resolution.

Show me your code then I can try to figure it out.

from socket.io.

justincampbell avatar justincampbell commented on May 3, 2024

I think I figured it out, at least in my scenario.

Doesn't work:
server = http.createServer(...).listen(80);
io.listen(server);

Work's fine:
server = http.createServer(...);
server.listen(80);
io.listen(server);

I also apologize for not posting my own solution. Hopefully someone from a Google search can figure this out faster than I did.

from socket.io.

martinklepsch avatar martinklepsch commented on May 3, 2024

Yup. I had exactly the same problem. ;-)

from socket.io.

FR6 avatar FR6 commented on May 3, 2024

Thanks JustinCampbell, your solution ( http://github.com/LearnBoost/Socket.IO-node/issues/issue/30#issue/30/comment/327445 ) resolved the problem for me.

from socket.io.

PenguinOfTheSky avatar PenguinOfTheSky commented on May 3, 2024

solution link is broken.

from socket.io.

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.