Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Janda committed Dec 3, 2011
1 parent 2fc59bf commit 274aa70
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 21 deletions.
13 changes: 0 additions & 13 deletions examples/ant1.js

This file was deleted.

8 changes: 0 additions & 8 deletions examples/ant2.js

This file was deleted.

13 changes: 13 additions & 0 deletions examples/client.js
@@ -0,0 +1,13 @@
var Ant = require('../lib/ant');

var client = new Ant({
port: 5000
})

client.connect(5001, function(remote) {
remote.on('hello', function() {
console.log('Hello world!');
});
})

client.start();
15 changes: 15 additions & 0 deletions examples/server.js
@@ -0,0 +1,15 @@
var Ant = require('../lib/ant');


var server = new Ant({
port: 5001
})

server.start();

function sayHello() {
server.emit('hello');
setTimeout(sayHello, 1000);
}

sayHello();

0 comments on commit 274aa70

Please sign in to comment.