Code Monkey home page Code Monkey logo

Comments (3)

kanaka avatar kanaka commented on May 29, 2024

@ntenisOT, a couple of suggestions:

  • You are shifting off a single byte as your length. However, as you indicate, your length may be up to 60000 characters. I suggest using rQshift16 to pull off the first 2 bytes as a single number (which can represent up to 65536 in length). Your server will always need to send the length as 2 bytes (big endian).
  • Once you have the length, the use rQshiftStr(length), to shift off the length of the string (not rQlen() which will shift off everything).
  • Also, before doing any shift (for the length of the string), you need to make sure that the receive queue as the number of elements that you want.

I'm closing the issue since it's not a problem with websockify, but feel free to ask more questions to this issue and I'll see them and I'll try and answer them as I have time.

from websockify.

ntenisOT avatar ntenisOT commented on May 29, 2024

Oups. Forgot to close this issue. I made it work. We know have a fully functional remote control of an Android phone using websockify and websockets!

Thanks kanaka!

from websockify.

kanaka avatar kanaka commented on May 29, 2024

Great to hear.

from websockify.

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.