require 'rubygems' require 'eventmachine' module EchoServer def receive_data(data) send_data(data) end end EventMachine.run do EventMachine.start_server "0.0.0.0", 8080, EchoServer end