Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

RDP has a .stream

  • Loading branch information...
commit 48ff83942adfbbac99e4f23108d4c1c790972ae5 1 parent b2d7b9f
@substack substack authored
Showing with 10 additions and 5 deletions.
  1. +6 −2 lib/parser.js
  2. +4 −3 lib/rdp.js
View
8 lib/parser.js
@@ -1,8 +1,12 @@
var Binary = require('bufferlist/binary');
+var Put = require('rfb/put');
+var TPKT = require('./tpkt');
module.exports = function (rdp, bufferList) {
- // prelude...
+ var tpkt = TPKT(rdp.stream);
Binary(bufferList)
- // ...
+ .tap(function () {
+
+ })
};
View
7 lib/rdp.js
@@ -14,12 +14,13 @@ function RDP (opts) {
if (!opts) opts = {};
var port = opts.port || 3389;
var host = opts.host || 'localhost';
- var stream = net.createConnection(port, host);
+ self.stream = net.createConnection(port, host);
+ self.write = self.stream.write.bind(stream);
var bufferList = new BufferList;
- sys.pump(stream, bufferList);
+ sys.pump(self.stream, bufferList);
- stream.on('connect', function () {
+ self.stream.on('connect', function () {
self.emit('connect');
Parser(self, bufferList);
});
Please sign in to comment.
Something went wrong with that request. Please try again.