<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>m_seki</author_name>
  <author_url>https://blog.hatena.ne.jp/m_seki/</author_url>
  <blog_title>@m_seki の</blog_title>
  <blog_url>https://druby.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>IPv4のドット表記、IPv6のドット表記、gethostname、&quot;localhost&quot;の優先度で返してみる。こうか? うーむ。drb/drb.rbのself.getservernameを取り替えると良いような気がするけどどう? require 'socket' def ipv4_addr(hostname) addr = Socket.getaddrinfo(hostname, nil, Socket::AF_INET, Socket::SOCK_STREAM, Socket::IPPROTO_IP) addr[0][3] rescue nil end def ipv6_addr(host…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdruby.hatenablog.com%2Fentry%2F20061212%2F1165939035&quot; title=&quot; ホスト名を求める - @m_seki の&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2006-12-12 00:57:15</published>
  <title> ホスト名を求める</title>
  <type>rich</type>
  <url>https://druby.hatenablog.com/entry/20061212/1165939035</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
