Skip to content

Instantly share code, notes, and snippets.

@cmol
Last active October 1, 2020 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmol/1edf6faa701af858f7f4dd3dd78450c9 to your computer and use it in GitHub Desktop.
Save cmol/1edf6faa701af858f7f4dd3dd78450c9 to your computer and use it in GitHub Desktop.
addr_info = Addrinfo.new(client)
puts "Client connected from #{addr_info.ip_address} using " +
"#{addr_info.ipv6_v4mapped? ? "IPv4" : "IPv6"}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment