English 中文(简体)
如何更改信号R Hub URL
原标题:How to modify the SignalR Hub URL
  • 时间:2011-11-15 18:43:42
  •  标签:
  • signalr

我愿使用一个比<代码>~/signalr/hubs的不同的基础中心。 如何修改这一术语,例如~/api/hubs?

第二个问题是,我是否对不同的枢纽使用不同的舱面? 例如:

~/api/chat/hubs  
~/api/email/hubs

感谢。

最佳回答

由此可见,现在可能达到0.5+:

RouteTable.Routes.MapHubs("~/api");
问题回答
  1. No you may not, it s hardcoded in the source.
  2. No the proxy generated is for all hubs.

Well this question is old (4 years? wtf.. I always thought web sockets was kinda new).

<>> 水井(Microsoft)在website 现在

这可能只是一种解决办法,但如果你处于困境的话。 在服务器的开端或“ow”时,这种电线类似......

app.MapSignalR("/newCoolUrl", new HubConfiguration());

Ehh 确信你需要替换你们使用“新CoolUrl”榜样的客户的一切“/签字人”

var connection = $.hubConnection("/newCoolUrl", { useDefaultPath: false });




相关问题
Enabling push notification with React.js and signalR

I need to enable pushnotifications using signalR import { HubConnectionBuilder} from @microsoft/signalr ; import jwt_decode from "jwt-decode"; let connection = null; ...

SignalR - how to detect disconnected clients

How to detect which clients was disconnected? I m using Hub and saw the chat example where the IDisconnect interface was implemented. De Disconnect() function is called when a page is refreshed or ...

信号呼唤 系统中其他地方的中枢客户

我建立了信号监测中心,供服务器和客户之间沟通。 中心服务器侧代码储存在一个称为Hooking.c的类别中。 我想要的是,能够采用Hooking所定义的方法。

Redirecting a user from within a SignalR Hub class

I have a button that users can click to bid on something. Each bid, broadcasts the latest bid to every other client. That s the reason why I m using SignalR. Now, the user needs to have active ...

热门标签