Пример #1
0
 private void OnEventReceived(ServerSentEvent sse)
 {
     if (EventReceived != null)
     {
         EventReceived(this, new ServerSentEventReceivedEventArgs(sse));
     }
 }
Пример #2
0
        // 受信内容を取り出す処理
        private void DispatchEvent(ServerSentEvent sse)
        {
            if (sse.IsEmptyData)
            {
                return;
            }

            if (!string.IsNullOrEmpty(sse.LastEventId))
            {
                reader.LastEventId = sse.LastEventId;
            }

            if (sse.Retry.HasValue)
            {
                reader.ReconnectionTime = sse.Retry.Value;
                // リトライフラグセット
                reader.RetryFlag = true;
            }
            OnEventReceived(sse);
        }
Пример #3
0
 public ServerSentEventReceivedEventArgs(ServerSentEvent message)
 {
     this.message = message;
 }