Skip to content

Instantly share code, notes, and snippets.

@ozuma
Last active December 17, 2015 15:29
Show Gist options
  • Save ozuma/5632409 to your computer and use it in GitHub Desktop.
Save ozuma/5632409 to your computer and use it in GitHub Desktop.
Receive a UDP Packet. (As server)
#!/usr/bin/ruby
require "socket"
udp = UDPSocket.open()
udp.bind("0.0.0.0", ARGV[0])
p udp.recv(65535)
udp.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment