hookio/hook.io — pull request #115 by kilianc (2011-10-26 14:01:25+00:00)
Title: added dnone connection events

i was unable to configure and listen for dnode errors,
so i added some listeners to the dnode client in the connect method

_just ran all the test with_ `✗ Broken » 72 honored ∙ 1 broken (1.902s)` _but the test was broken before my commit_

__something like this is now possbile__

````javascript

hook = new Hook({ name: 'who', 'hook-host': 'xxx.xxx.xxx.xxx', debug: true });
hook.once('hook::ready', function(){
hook.emit('running');
});
hook.on('connection::end', function(){
setTimeout(hook.connect.bind(hook), reconnectionTime);
});
hook.on('connection::error', function(){
setTimeout(hook.connect.bind(hook), reconnectionTime);
});
hook.connect();
````

I think something similar could be implemented at library level, what do you think about that?