Code Monkey home page Code Monkey logo

Comments (5)

theturtle32 avatar theturtle32 commented on July 21, 2024

What server and client code are you running? What version of Node? The WebSocket-Node package doesn't ship with a "server.js" or "client.js"

I do not experience this problem when running the included libwebsockets-test-server.js and libwebsockets-test-client.js under node v0.4.10

from websocket-node.

hinzundcode avatar hinzundcode commented on July 21, 2024

I used the server and client example from the README and my node version is 0.4.10.

from websocket-node.

theturtle32 avatar theturtle32 commented on July 21, 2024

Interesting. I hadn't specifically written those examples to go together, mostly just to illustrate the API quickly. I narrowed it down to the fact that the number being passed to sendUTF in the client isn't being converted to a string. If you change this line:
connection.sendUTF(number);
to this:
connection.sendUTF(number.toString());

then it works fine.

from websocket-node.

theturtle32 avatar theturtle32 commented on July 21, 2024

Fixed sendUTF() in commit a7b884b

from websocket-node.

hinzundcode avatar hinzundcode commented on July 21, 2024

Thank you :)

from websocket-node.

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.