C# MVCでServer-Sent Eventsを実装する(ApiControllerサンプル)
(クライアント側)JavaScriptコード:
// サーバーイベントストリームの接続処理
$(function () {
if (typeof (EventSource) !== "undefined") {
// メッセージ表示領域の指定
const outputArea = document.getElementById("EventOutput");
// イベントストリームの初期化
const stream = new EventSource(" ...
7月5日 18:37 投稿