如何从ASP.NET Core 2.1
SignalR Core 1.0.0
时定义TransportType
在1.0.0-alpha2-final
我有这段代码:
import { HubConnection, TransportType } from "@aspnet/signalr-client";
this.hub = new HubConnection(`/HUB/${url}`, { transport: TransportType.WebSockets});
我找到了1.0.0 here的示例:
import { HubConnection, HubConnectionBuilder } from "@aspnet/signalr";
this.hub = new HubConnectionBuilder()
.withUrl(`/HUB/${url}`)
.build();
但不知道如何定义TransportType WebSockets
。