<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>castaneai</author_name>
  <author_url>https://blog.hatena.ne.jp/castaneai/</author_url>
  <blog_title>castaneaiのブログ</blog_title>
  <blog_url>https://castaneai.hatenablog.com/</blog_url>
  <categories>
    <anon>websocket</anon>
    <anon>dotnet</anon>
  </categories>
  <description>リアルタイムな通信を行う際に何かと活躍するプロトコル WebSocket。 .NETには System.Net.WebSockets として組み込まれており、簡単に使い始めることができる。 しかし、WebSocketにおいて「切断」という概念は取り扱いに注意が必要だ。 本記事ではSystem.Net.WebSocketsが切断をどのように扱っているか見ていく。 WebSocketにおける正しい切断 WebSocket は Socket という名前からも想像できるように、基となるのはTCP Socketだ。 よってTCP Socketを閉じれば切断できるが、これは正しい切断ではない。 RFC 6…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcastaneai.hatenablog.com%2Fentry%2Fclosing-websocket-connection-in-dotnet&quot; title=&quot;.NETのWebSocketと、切断の扱い - castaneaiのブログ&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>2023-08-01 19:09:28</published>
  <title>.NETのWebSocketと、切断の扱い</title>
  <type>rich</type>
  <url>https://castaneai.hatenablog.com/entry/closing-websocket-connection-in-dotnet</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
