Skip to content

Commit

Permalink
Add examples dir.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Makarov committed Oct 24, 2012
1 parent a66dc86 commit 222d06a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/simple.coffee
@@ -0,0 +1,11 @@
{Eping} = require '..'

hosts = []
for i in [1..255]
hosts.push "172.20.0.#{i}"

p = new Eping(hosts)
.on('one', (host, isUp) -> console.log 'one:', host, isUp)
.on('all', (status) -> console.log 'all:', status)
.start()

0 comments on commit 222d06a

Please sign in to comment.