Permalink
Find file
6a272b9 Aug 25, 2011
executable file 19 lines (14 sloc) 273 Bytes
#!/usr/bin/env ruby
require 'rubygems'
require 'eventmachine'
HOST = ''
PORT = 5000
module Echo
def receive_data(data)
send_data data
end
end
EventMachine.run {
puts "Echo server listening on #{HOST}:#{PORT}"
EventMachine.start_server HOST, PORT, Echo
}