You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of using SignalR input binding `[SignalRConnectionInfoInput]`, negotiation in class-based model can be more flexible. Base class `ServerlessHub` has a method `NegotiateAsync`, which allows user to customize negotiation options such as `userId`, `claims`, etc.
129
+
Instead of using SignalR input binding `[SignalRConnectionInfoInput]`, negotiation in class-based model can be more flexible. Base class `ServerlessHub` has a method `NegotiateAsync`, which allows users to customize negotiation options such as `userId`, `claims`, etc.
@@ -141,7 +141,7 @@ You could send messages, manage groups, or manage clients by accessing the membe
141
141
-`ServerlessHub.UserGroups` for managing users with groups, such as adding users to groups, removing users from groups.
142
142
-`ServerlessHub.ClientManager` for checking connections existence, closing connections, etc.
143
143
144
-
### Strongly Typed Hub
144
+
### Strongly typed Hub
145
145
146
146
[Strongly typed hub](/aspnet/core/signalr/hubs?#strongly-typed-hubs) allows you to use strongly typed methods when you send messages to clients. To use strongly typed hub in class based model, extract client methods into an interface `T`, and make your hub class derived from `ServerlessHub<T>`.
147
147
@@ -158,7 +158,7 @@ Then you can use the strongly typed methods as follows:
Itallowsyoutocustomize where the SignalR Service bindings look for connection string. If it's absent, the default value `AzureSignalRConnectionString` is used.
181
+
* The class name of the serverless hub is automatically used as `HubName`.
182
+
* You might have noticed the `SignalRConnection` attribute used on serverless hub classes as follows:
Itallowsyoutocustomize where the connection string for serverless hub is. If it's absent, the default value `AzureSignalRConnectionString` is used.
188
188
189
189
> [!IMPORTANT]
190
-
> `SignalRConnection` attribute doesn't change the connection string setting of SignalR triggers, even though you use SignalR triggers inside the serverless hub. You should specify the connection string setting for each SignalR trigger if you want to customize it.
190
+
> SignalR triggers and serverless hubs are independent. Therefore, the class name of serverless hub and `SignalRConnection` attribute doesn't change the settings of SignalR triggers, even though you use SignalR triggers inside the serverless hub.
191
191
192
192
# [In-process model](#tab/in-process)
193
193
@@ -229,7 +229,7 @@ public class HubName1 : ServerlessHub
229
229
}
230
230
```
231
231
232
-
All functions that want to use the class-based model need to be a method of the class that inherits from **ServerlessHub**. The class name `SignalRTestHub` in the sample is the hub name.
232
+
All functions that want to use the class-based model need to be a method of the class that inherits from **ServerlessHub**. The class name `HubName1` in the sample is the hub name.
233
233
234
234
### Define hub method
235
235
@@ -250,13 +250,13 @@ In class based model, `[SignalRParameter]` is unnecessary because all the argume
250
250
251
251
### Negotiation experience in class-based model
252
252
253
-
Instead of using SignalR input binding `[SignalR]`, negotiation in class-based model can be more flexible. Base class `ServerlessHub` has a method.
253
+
Instead of using SignalR input binding `[SignalR]`, negotiation in class-based model can be more flexible. Base class `ServerlessHub` has a method:
0 commit comments