想知道是否有人具有天蓝色信号器服务(v1.04)和角度cli(v6 +)的经验。在连接到集线器后了解如何获取客户端上下文时遇到一些问题。有什么想法吗?
这是中心的上下文,任何帮助将不胜感激!
this.getConnectionInfo().subscribe(info => {
console.log("INFO", info);
let options = {
accessTokenFactory: () => info.accessToken
};
this.hubConnection = new signalR.HubConnectionBuilder()
.withUrl(info.hubUrl, options)
.configureLogging(signalR.LogLevel.Information)
.build();
this.hubConnection.start().then(() => {
console.log('Hub connection started init');
**[GET hubConnectionContext]**
console.log('Connection', this.hubConnection);
})
.catch(err => console.error(err.toString()));