Skip to content

Commit 31e45d3

Browse files
authored
Update signalr-howto-use.md
1 parent 1a6be5e commit 31e45d3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

articles/azure-signalr/signalr-howto-use.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to use Azure SignalR Service in your app server
44
author: vicancy
55
ms.service: signalr
66
ms.topic: how-to
7-
ms.date: 12/18/2023
7+
ms.date: 04/18/2024
88
ms.author: lianwei
99
---
1010

@@ -150,8 +150,9 @@ You can increase this value to avoid client disconnect.
150150

151151
#### `TransportTypeDetector`
152152

153-
- Default value is null.
154-
- This option defines a function to customize the transports that clients can use to send HTTP requests. If it's null, all transports are supported.
153+
- Default value: All transports are enabled.
154+
- This option defines a function to customize the transports that clients can use to send HTTP requests.
155+
- Use this options instead of [`HttpConnectionDispatcherOptions.Transports`](https://learn.microsoft.com/aspnet/core/signalr/configuration?&tabs=dotnet#advanced-http-configuration-options) to configure transports.
155156
156157
### Sample
157158

@@ -167,6 +168,7 @@ services.AddSignalR()
167168

168169
options.GracefulShutdown.Mode = GracefulShutdownMode.WaitForClientsClose;
169170
options.GracefulShutdown.Timeout = TimeSpan.FromSeconds(10);
171+
options.TransportTypeDetector = httpContext => AspNetCore.Http.Connections.HttpTransportType.WebSockets | AspNetCore.Http.Connections.HttpTransportType.LongPolling;
170172
});
171173
```
172174

0 commit comments

Comments
 (0)