<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hitode909</author_name>
  <author_url>https://blog.hatena.ne.jp/hitode909/</author_url>
  <blog_title>hitode909の日記</blog_title>
  <blog_url>https://blog.sushi.money/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>少し前に書いたっきりで忘れそうなのでメモっておく １行ごとに取ってくる場合 ip = &quot;localhost&quot; port = 3100 s = TCPSocket.open(ip,port) str = s.gets getsで１行取得可能 文字数を指定して取ってくる場合 s.recv(8) で8バイトだけ受信できる。 例えば、先頭の8バイトに文字数が入ってる場合だと、 ip = &quot;localhost&quot; port = 3100 s = TCPSocket.open(ip,port) str = s.recv(s.recv(8).to_i) こうすれば、先頭８バイトを受信して、整数にして、その文字…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.sushi.money%2Fentry%2F20080617%2F1213720332&quot; title=&quot;Rubyでソケットを使うときのメモ - hitode909の日記&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>2008-06-17 01:32:12</published>
  <title>Rubyでソケットを使うときのメモ</title>
  <type>rich</type>
  <url>https://blog.sushi.money/entry/20080617/1213720332</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
