Comments (4)
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.
@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.
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.
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)
- websockify.rb with SSL HOT 2
- The server can handle how many concurrent clients? HOT 4
- Feature request: Simple web server support in C version. HOT 3
- Websockify-c: Sec-WebSocket-Origin is mandatory not following RFC3864 HOT 2
- can we achive ws only instead of wss
- Memory leak HOT 1
- websockify stucks at select timeout HOT 13
- Use of Uninitialized Variable HOT 1
- Glitches using websockify-c HOT 1
- binary support in C version Websockify HOT 4
- Security: Stack based Buffer Overflows
- websockify C binary mode? HOT 1
- b64_ntop() / b64_pton() not universally available on all C libraries HOT 2
- The C version doesn't close its file descriptors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websockify-other.