[SignalR] Automatically reconnect > C#/.Net/Blazor/IIS

본문 바로가기
사이트 내 전체검색

C#/.Net/Blazor/IIS

[SignalR] Automatically reconnect

페이지 정보

작성자 sbLAB 댓글 0건 조회 5,147회 작성일 21-12-27 23:45

본문

Automatically reconnect

https://docs.microsoft.com/en-us/aspnet/core/signalr/dotnet-client?view=aspnetcore-6.0&tabs=visual-studio 


       
hubConnection = new HubConnectionBuilder()
     .WithUrl(_navigationManager.ToAbsoluteUri("/chathub"))
     .WithAutomaticReconnect(new[] { TimeSpan.Zero,
                                            TimeSpan.FromSeconds(2), //다시 연결시도 초간격
                                            TimeSpan.FromSeconds(10),
                                            TimeSpan.FromSeconds(30),
                                            TimeSpan.FromSeconds(60),
                                            TimeSpan.FromSeconds(180) }).Build();
 
[이 게시물은 sbLAB님에 의해 2022-12-22 09:41:18 Web/PHP/API에서 이동 됨]

댓글목록

등록된 댓글이 없습니다.

회원로그인

접속자집계

오늘
225
어제
396
최대
1,279
전체
222,275

그누보드5
Copyright © sebom.com All rights reserved.