-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow simpler direct data access #3
Comments
JSON is good for sending complex data through the network. |
Hi, I agree JSON is a good idea, but in my use case the websocket is a terminal connection to a virtual machine serial console - raw terminal data :) |
Ok but how do you send complex data through the network? For instance, this is how ng-websocket sends data via websocket: var ws = new WebSocket(url),
complexData = {a:10, b:'hello', c:{ca:20, cb: 'world'}, d: ['a', 'b', 10, {da: 15}]};
ws.send(JSON.stringify(complexData)); What's your way? |
My current use-case is just the console connection, like so:
(from https://github.com/r1chardj0n3s/angboard/blob/master/app/scripts/directives/console.js) |
The current module makes working directly with the raw data coming from the socket tricky. I would like to add an option to not automatically JSON encode/decode the data being sent and retrieved. This would be defaulted to enabling the parsing, for backwards compatibility.
The text was updated successfully, but these errors were encountered: