Permalink
Browse files

all tests pass hooray!

  • Loading branch information...
1 parent e90b9f6 commit 67d273ebe15642b9bb00e9ba7d8d76caf0f120f8 @substack committed Apr 23, 2011
Showing with 12 additions and 8 deletions.
  1. +1 −1 package.json
  2. +4 −2 test/password.js
  3. +7 −5 tests/binary_rfb_server.js
View
@@ -2,7 +2,7 @@
"name": "rfb",
"version": "0.0.9",
"description": "Implements the client-side of the rfb protocol that vnc uses",
- "author": "James Halliday",
+ "author" : "James Halliday <mail@substack.net> (http://substack.net)",
"directories": { "lib": "./lib" },
"main": "./lib/rfb.js",
"repository": {
View
@@ -21,8 +21,10 @@ exports.password = function () {
clearTimeout(to.monitor);
q.stdout.removeListener('data', fn);
- q.stdin.write('change vnc password\n');
- q.stdin.write('moo\n');
+ setTimeout(function () {
+ q.stdin.write('change vnc password\n');
+ q.stdin.write('moo\n');
+ }, 50);
setTimeout(function () {
var r = new RFB({
@@ -8,16 +8,19 @@ var fs = require('fs');
var path = require('path');
function Word8(x) {
- return String.fromCharCode(x);
+ return String.fromCharCode(x);
}
function Word16be(x) {
- return String.fromCharCode((x>>8)&0xFF) + String.fromCharCode(x&0xFF);
+ return String.fromCharCode((x>>8)&0xFF) + String.fromCharCode(x&0xFF);
}
function Word32be(x) {
- return String.fromCharCode((x>>24)&0xFF) + String.fromCharCode((x>>16)&0xFF) +
- String.fromCharCode((x>>8)&0xFF) + String.fromCharCode(x&0xFF);
+ return String.fromCharCode((x>>24)&0xFF)
+ + String.fromCharCode((x>>16)&0xFF)
+ + String.fromCharCode((x>>8)&0xFF)
+ + String.fromCharCode(x&0xFF)
+ ;
}
var S_EXPECT_RFB = 0;
@@ -194,4 +197,3 @@ var RFBServer = net.createServer(function (stream) {
}).listen(59000);
sys.log('rfb server on port 59000');
-

0 comments on commit 67d273e

Please sign in to comment.