Demo project for the course Advanced JavaScript at FMI
Node 0.10.32 required.
Demo project for the class Advanced JavaScript at the department mathematics and informatics in Sofia University.
License: MIT License
i spent hours fixing your code. and after fixing most i relized it was still useless. please improve to make it atleast workable. i can help
Line 447: return keys[shift ? 2 : 1];
Should be
return keys[shift ? 1 : 0];
I checked out the source code and run without any modifications.
I connected to a VNC server successfully, but when I move or click the mouse or type something with the keyboard, the screen is not updated. I tried to put "console.trace()" into server.js #handleFrame() function and found out that it was never called more than once in the whole 15 minutes.
Note: I connect to a real VNC service on another VM on the same host, so network latency is absolutely out of question.
~/Projects/js-vnc-demo-project master ✗
▶ npm install
> [email protected] install /Users/jjelinek/Projects/js-vnc-demo-project/node_modules/node-png
> node-gyp rebuild
CXX(target) Release/obj.target/png/src/common.o
CXX(target) Release/obj.target/png/src/png_encoder.o
CXX(target) Release/obj.target/png/src/png.o
CXX(target) Release/obj.target/png/src/fixed_png_stack.o
CXX(target) Release/obj.target/png/src/dynamic_png_stack.o
CXX(target) Release/obj.target/png/src/module.o
CXX(target) Release/obj.target/png/src/buffer_compat.o
SOLINK_MODULE(target) Release/png.node
SOLINK_MODULE(target) Release/png.node: Finished
~/Projects/js-vnc-demo-project master ✗
▶ time node server.js
Listening on port 8090
node server.js 0.20s user 0.04s system 99% cpu 0.239 total
as you can see, the server stops right after Listening on port 8090
. No errors are present. Any idea what's happening?
It needs to be rfb2
var RFB = require('rfb2');
After making the changes, npm start throws an error:
`Listening on port 8090
(node:11204) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.
Client connected
TypeError: RFB is not a function
at createRfbConnection (C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\server.js:91:9)
at Socket. (C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\server.js:132:15)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at SocketNamespace.handlePacket (C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\node_modules\socket.io\lib\namespace.js:335:22)
at Manager.onClientMessage (C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\node_modules\socket.io\lib\manager.js:518:38)
at WebSocket.Transport.onMessage (C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\node_modules\socket.io\lib\transport.js:369:20)
at Parser. (C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\node_modules\socket.io\lib\transports\websocket\hybi-16.js:39:10)
at emitOne (events.js:96:13)
at Parser.emit (events.js:188:7)
C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\server.js:59
r.on('error', function (e) {
^
TypeError: Cannot read property 'on' of undefined
at addEventHandlers (C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\server.js:59:4)
at createRfbConnection (C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\server.js:103:3)
at Socket. (C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\server.js:132:15)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at SocketNamespace.handlePacket (C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\node_modules\socket.io\lib\namespace.js:335:22)
at Manager.onClientMessage (C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\node_modules\socket.io\lib\manager.js:518:38)
at WebSocket.Transport.onMessage (C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\node_modules\socket.io\lib\transport.js:369:20)
at Parser. (C:\Users\bhowmiks\Experiments\cloneTest\js-vnc-demo-project\node_modules\socket.io\lib\transports\websocket\hybi-16.js:39:10)
at emitOne (events.js:96:13)`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.