Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

add some documentation #4

Open
wants to merge 2 commits into from

1 participant

Victor
Victor

some documentation is better than no documentation and this module is too awesome to go unnoticed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 30, 2013
  1. Victor

    added some documentation

    vicapow authored
  2. Victor

    actually added documentation

    vicapow authored
This page is out of date. Refresh to see the latest.
Showing with 36 additions and 2 deletions.
  1. +1 −0  .gitignore
  2. +0 −2  README
  3. +35 −0 README.md
1  .gitignore
View
@@ -0,0 +1 @@
+node_modules
2  README
View
@@ -1,2 +0,0 @@
-RFB client library for node.js
-http://www.realvnc.com/docs/rfbproto.pdf
35 README.md
View
@@ -0,0 +1,35 @@
+## RFB client library for node.js
+
+see: http://www.realvnc.com/docs/rfbproto.pdf
+
+### Usage Example
+
+````js
+var rfb = require('rfb')({
+ host: 'localhost'
+ , port: 5900
+ , shared: true
+ , securityType: 'vnc' // or 'none'
+ , password: 'test'
+});
+rfb.on('error', function(e){
+ throw e;
+});
+rfb.on('raw', function(rect){
+ rect.x
+ rect.y
+ rect.width
+ rect.height
+ rect.encodingType
+ rect.encodingType
+ rect.depth
+ rect.fb // contains the actual frame buffer
+});
+
+// other methods
+rfb.sendPointer(x, y, mask);
+rfb.sendKeyUp(key);
+rfb.sendKeyDown(key);
+rfb.requestUpdate({ ... });
+rfb.pointer(x, y, mask);
+````
Something went wrong with that request. Please try again.