Skip to content

Instantly share code, notes, and snippets.

@phuesler
Created November 7, 2011 22:47
Show Gist options
  • Save phuesler/1346455 to your computer and use it in GitHub Desktop.
Save phuesler/1346455 to your computer and use it in GitHub Desktop.
class Handler < EM::Connection
def initialize(*args)
   @channel = args[0]
@counter = 0
super *args
end
def receive_data(data)
   if data && data.size > 0
@counter += 1
     @channel.push(data)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment