<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>embedded</author_name>
  <author_url>https://blog.hatena.ne.jp/embedded/</author_url>
  <blog_title>組み込みの人。</blog_title>
  <blog_url>https://embedded.hatenadiary.org/</blog_url>
  <categories>
    <anon>linux</anon>
  </categories>
  <description>TCP socketではwriteの後すぐにcloseしてはいけない - Togetter TCP socketではwriteの後すぐにcloseしてはいけない。 相手側に全てのデータが届いてからcloseする必要がある。 shutdown で書き込み側だけハーフクローズするとよい。 相手側がcloseしてから、こちらをcloseする。相手側がcloseしたことは、readを呼んでブロックさせておくと、読み込みバイト数==0 つまりEOFになったことでわかる。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fembedded.hatenadiary.org%2Fentry%2F20120409%2Fp2&quot; title=&quot;TCP socketではwriteの後すぐにcloseしてはいけない - 組み込みの人。&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>2012-04-09 00:00:01</published>
  <title>TCP socketではwriteの後すぐにcloseしてはいけない</title>
  <type>rich</type>
  <url>https://embedded.hatenadiary.org/entry/20120409/p2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
