Skip to content

Instantly share code, notes, and snippets.

@mizzy
Created April 9, 2013 08:23
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 mizzy/5343953 to your computer and use it in GitHub Desktop.
Save mizzy/5343953 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'eventmachine'
module EchoHandler
def receive_data data
send_data(data)
end
end
EventMachine.run {
EventMachine.start_server('localhost', 8000, EchoHandler)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment