Skip to content

Instantly share code, notes, and snippets.

@yannski
Created May 30, 2010 11:01
Show Gist options
  • Save yannski/418948 to your computer and use it in GitHub Desktop.
Save yannski/418948 to your computer and use it in GitHub Desktop.
class LongPollHttpServer < EM::Connection
def unbind
end
def receive_data(data)
end
end
EM.epoll if EM.epoll?
EM.run do
puts "#{Time.now} Starting server on port #{ARGV.first || 8000}"
EM.start_server '0.0.0.0', ARGV.first || 8000, LongPollHttpServer
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment