Giter Site home page Giter Site logo

Comments (4)

WhiteRavenTechnology avatar WhiteRavenTechnology commented on July 20, 2024

Quick followup: I managed to get the websockify.js library to work, and now I'm getting a different message from the proxy:
0: Receiving frames larger than 65535 bytes not supported
0: decoding error
0: handler exit

I suppose the obvious question, then, is do you anticipate adding support for frames larger than 65535 bytes? :)

I appreciate any advice you might have for me.

  • John

from websockify-other.

kanaka avatar kanaka commented on July 20, 2024

@JFitzDela any chance you can post enough code to reproduce the problem you are seeing? I have no problem supporting frames larger than 65535 bytes from the browser, however, this never happens with noVNC (client to server traffic is usually only a few dozens bytes at a time). If you can provide a reproducer/test case, then I should be able to fix it pretty quickly. Otherwise, it might be a while before I get around to this (since I'll have to code up the test case in addition to the fix). Thanks.

from websockify-other.

WhiteRavenTechnology avatar WhiteRavenTechnology commented on July 20, 2024

Happy to! If the attachment doesn't work (replying by e-mail, and I'm new to github), the source for the example that breaks is available at http://whiteraventechnology.com/websockify_test.zip.

The data in the example is actually closer to 300kb -- I didn't realize it was SO large, but for the sake of testing, that's what's breaking the C version of the server on my end (the python version works fine).

My code basically breaks the large string into 8192 byte chunks and sends them as individual messages (a requirement of my target server in this case). Interestingly, it's only after a final message is sent some few seconds AFTER all of the parts have been sent that the server kills the connection with the "Receiving frames larger than 65535 bytes not supported" message.

I appreciate your help!

  • John

P.S. - Only difference in the included websock.js and yours is that I replaced the Util functions with console.logs -- they were causing an odd conflict somewhere in my code, so I removed the library.

from websockify-other.

kanaka avatar kanaka commented on July 20, 2024

Thanks, I've replicated the problem. The C version is not as well designed as the python version and has some stack buffer size assumptions. Getting it to support larger frames isn't too hard and I've started working on it, but my spare time is limited so guarantee when I'll get to this.

BTW, one way you might be able to work around this is by setting a very short timeout (setTimeout) between sends of less than 65536 bytes. The reason you are running into frames larger than 65536 even when you are only sending 8192 at a time is because you are doing all of them within the same Javascript execution path/context. If you set a slight delay between each one then you will give the browser the opportunity to send a separate frame and websockify a chance to process it in smaller chunks.

from websockify-other.

Related Issues (15)

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.