Skip to content

Instantly share code, notes, and snippets.

@Poincare
Created June 26, 2012 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Poincare/2997763 to your computer and use it in GitHub Desktop.
Save Poincare/2997763 to your computer and use it in GitHub Desktop.
require 'eventmachine'
class Echo < EM::Connection
def receive_data(data)
send_data(data)
end
end
EM.run do
EM.start_server("0.0.0.0", 1337, Echo)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment