<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gsf_zero1</author_name>
  <author_url>https://blog.hatena.ne.jp/gsf_zero1/</author_url>
  <blog_title>いろいろ備忘録日記</blog_title>
  <blog_url>https://devlights.hatenablog.com/</blog_url>
  <categories>
    <anon>golang</anon>
  </categories>
  <description>概要 サンプル 参考情報 概要 以下、自分用のメモです。 TCP通信やUDP通信を行う際に net.Dial を使って接続すると思います。 この関数をそのまま使うと接続タイムアウトが指定出来ません。 んで、タイムアウト付きで接続処理をしたい場合は以下の選択肢があります。 net.Dialerを使ってDialContextを呼び出し net.DefaultResolver().Dialを呼び出し net.DialTimeoutを呼び出し net.DialerのTimeoutを指定して呼び出し 実際にソース見たほうが分かりやすいと思いますので、以下に自分のメモ代わりに記載します。 サンプル pac…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdevlights.hatenablog.com%2Fentry%2F2023%2F01%2F23%2F073000&quot; title=&quot;Goメモ-284 (net.Dialでcontext.Contextを渡してタイムアウト付きで接続する) - いろいろ備忘録日記&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>https://go.dev/blog/gopher/header.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-01-23 07:30:00</published>
  <title>Goメモ-284 (net.Dialでcontext.Contextを渡してタイムアウト付きで接続する)</title>
  <type>rich</type>
  <url>https://devlights.hatenablog.com/entry/2023/01/23/073000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
