<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>n_a_u</author_name>
  <author_url>https://blog.hatena.ne.jp/n_a_u/</author_url>
  <blog_title>n_a_uの予定は常に未定</blog_title>
  <blog_url>https://n-a-u.hatenadiary.org/</blog_url>
  <categories>
    <anon>プログラミング</anon>
  </categories>
  <description>もともとはクライアント側を先に起動してlocalhostでconnect()した後で、サーバ側を立ち上げるとポート番号が使われてるからダメ、といわれてたのが大元で、理由を調べてみた。 その結果connect()を無限ループさせている間になぜかconncet()が0を返すのが原因だというのが分かった。以下コード。 int main(int argc, char **argv){ struct hostent *ent; struct in_addr in; struct sockaddr_in addr; int sock; char ip[300]; int32_t ret; ent = ge…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fn-a-u.hatenadiary.org%2Fentry%2F20091221%2F1261360709&quot; title=&quot;connect()を無限ループしてはいけない？ - n_a_uの予定は常に未定&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>2009-12-21 10:58:29</published>
  <title>connect()を無限ループしてはいけない？</title>
  <type>rich</type>
  <url>https://n-a-u.hatenadiary.org/entry/20091221/1261360709</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
