Skip to content

Commit

Permalink
added new files
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ ONeal committed Apr 15, 2011
1 parent 82eb519 commit 28ba01a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fails-on-arm/README.md
Expand Up @@ -20,7 +20,7 @@ Compiling On Ubuntu
..
# or just `cmake -DCMAKE_BUILD_TYPE=Debug ..` for native builds
make
sudo make install
# `sudo make install` for native builds

cd ~/
git clone git://github.com/coolaj86/node-examples-js.git
Expand Down
14 changes: 14 additions & 0 deletions test-drain-client.js
@@ -0,0 +1,14 @@
(function () {
"use strict";

var net = require('net'),
stream = net.createConnection('/tmp/node-drain-test.sock');

stream.on('drain', function () {
console.log('drain client');
stream.write('hello');
});
stream.on('data', function (data) {
console.log(data.toString());
});
}());
14 changes: 14 additions & 0 deletions test-drain-server.js
@@ -0,0 +1,14 @@
(function () {
"use strict";

var net = require('net');

net.createServer(function (stream) {
stream.on('drain', function () {
console.log('drain server');
});
stream.on('data', function (data) {
stream.write("echo " + data.toString() + new Buffer(9096).toString());
});
}).listen('/tmp/node-drain-test.sock');
}());

0 comments on commit 28ba01a

Please sign in to comment.