Skip to content

Instantly share code, notes, and snippets.

@phuesler
Created November 7, 2011 22:17
Show Gist options
  • Save phuesler/1346381 to your computer and use it in GitHub Desktop.
Save phuesler/1346381 to your computer and use it in GitHub Desktop.
require 'eventmachine'
class Handler < EM::Connection
def receive_data(data)
  log_line = Syslog.parse(data)
puts log_line.messge
end
end
EM.run {
host = "127.0.0.1"
port = "3000"
EM::open_datagram_socket(host, port, Handler)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment