Skip to content

Instantly share code, notes, and snippets.

@ozuma
Created May 15, 2013 02:18
Show Gist options
  • Save ozuma/5581227 to your computer and use it in GitHub Desktop.
Save ozuma/5581227 to your computer and use it in GitHub Desktop.
Send a UDP test packet.
#!/usr/bin/ruby
require "socket"
udp = UDPSocket.open()
sockaddr = Socket.pack_sockaddr_in(53, "192.168.0.1")
udp.send("HELLO", 0, sockaddr)
udp.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment