Skip to content

Instantly share code, notes, and snippets.

var
PARALLEL_CONNECTS = 10,
http = require('http'),
sys = require('sys'),
connectionCount = 0,
messageCount = 0;
lastMessages = 0;
function addClient() {
class SomeClass
class << self
def hooks
@hooks ||= Hash.new([])
end
def add_hook(kind, &block)
self.hooks[kind] << block
end