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