Skip to content

Instantly share code, notes, and snippets.

@phuesler
Created November 7, 2011 22:57
Show Gist options
  • Save phuesler/1346466 to your computer and use it in GitHub Desktop.
Save phuesler/1346466 to your computer and use it in GitHub Desktop.
EM.run {
channel = EM::Channel.new
# define your websocket server here
# start udp server
  host = "127.0.0.1"
  port = "3000"
# pass in the channel to the data handler
  EM::open_datagram_socket(host, port, Handler, channel)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment