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
When to use the generated proxy
If you want to register multiple event handlers for a client method that the server calls, you can't use the generated proxy. Otherwise, you can choose to use the generated proxy or not based on your coding preference.
I have registered multiple client-side handlers, and it works.
For example
var pxyHub = $.connection.MySRHub;
pxyHub.client.someHandlerOne = function (p1, p2) {... etc...};
pxyHub.client.someHandlerTwo = function (whatever) {... etc...};
The text was updated successfully, but these errors were encountered:
The docs are referring to multiple handlers for the same method (hence "multiple event handlers for a client method"). I.e. code like this (note the += operator doesn't work this way in JavaScript so this is pseudo code that does not actually work):
Doco at the following url states:
https://docs.microsoft.com/en-us/aspnet/signalr/overview/guide-to-the-api/hubs-api-guide-javascript-client
When to use the generated proxy
If you want to register multiple event handlers for a client method that the server calls, you can't use the generated proxy. Otherwise, you can choose to use the generated proxy or not based on your coding preference.
I have registered multiple client-side handlers, and it works.
For example
var pxyHub = $.connection.MySRHub;
pxyHub.client.someHandlerOne = function (p1, p2) {... etc...};
pxyHub.client.someHandlerTwo = function (whatever) {... etc...};
The text was updated successfully, but these errors were encountered: