Comments (5)
If you use include/websock.js then you really don't have to worry about what is happening on the channel. You can use send_string() and rQshiftStr() to send and receive strings. See the websock.js API
The focus of websockify and websocket.py is too support sending binary data back-and-forth between the browser. That's why the default send and receive format when using include/websock.js is an array of bytes and not strings (although string convenience routines are provided).
Once WebSocket binary API support is more prevalent in browsers I will be adding binary support to include/websock.js so that base64 is not needed (websocket.py already supports binary frames if 'binary' is in the protocol field).
I'm not fundamentally opposed to allowing non-base64 encoded strings to be sent/received, but I'm probably not interested enough to implement it myself. Also, it would need not to be a separate protocol value "raw_text" or something since base64 needs to be the default if no protocol value is specified (for backwards compatibility with existing applications). I've tagged this issue as "feature" and "patchwelcome".
from websockify.
Thanks for adding such a detailed explanation of the current state. Depending on performance impacts we discover in the next couple of months compared to our previous implementation, we may take you up on that patchwelcome.
from websockify.
Unless you are planning on sending several MB per second, I don't expect you'll run into a CPU performance issue (noVNC receives and decodes several MB/s pretty easily on recent browsers). base64 encoded data is about 25% larger then equivalent text so if bandwidth is your main issue (and you really are just sending plain string/JSON) then it might be worth it.
from websockify.
We're mostly concerned with latency issues, rather than pushing around lots of data. Having said that, I doubt we'll have any problems at all, but if we do, I'll make sure we pass on the results of any work on a raw text version. This project has been extremely helpful to us, thanks to you and everyone working on it.
from websockify.
websock.js and websockify now supports sending raw binary data (typed arrays) over the WebSocket channel without the need for base64 encoding. There is still an "encoding" step to convert normal javascript arrays to typed arrays and vice versa, but that can be an optimization if somebody wants to tackle it. I consider the base binary support to be complete.
This was commits: 376872d, and 068065e
from websockify.
Related Issues (20)
- Confusing running TurboVNC and Websockify
- systemd script to startup
- about target-config HOT 1
- tests failed on macos
- Logging and monitor HOT 1
- How to Revoking a Certificate of VNCServer? HOT 1
- TypeError: 'str' object cannot be interpreted as an integer
- noVNC & websockify in Docker Compose on Raspberry Pi 4 using RealVNC Server HOT 1
- Installation fails HOT 1
- wss: via ssl on linux debian board HOT 1
- Readme is missing examples HOT 1
- Failed when connecting: Connection closed (code: 1005) HOT 2
- soft reload possibility HOT 1
- novnc session getting disconnected after 30 min if left idle HOT 5
- Server disconnected (code: 1015). Open developer tools (F12/Ctrl+Shift+I on Windows, Option+Command+I on Mac OS) and switch to "Console" for details HOT 1
- Exception when use JSONTokenApi as token plugin
- how to connect to tls vnc server HOT 4
- Extra parameters HOT 2
- Connection pooling HOT 1
- which option disabling directory listings HOT 1
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.