public static ServiceClientProxy CreateSingleGroupExceptProxy(this SignalR signalr, string hubName, string groupName, IReadOnlyList <string> excludedIds) { return(new ServiceClientProxy( $"http://{signalr.HostName}/{signalr.ApiVersion}/hub/{hubName}/group/{groupName}", () => signalr.GenerateServerToken(hubName), excludedIds)); }
internal void UseService(SignalR signalr) { var serviceUrl = GetServiceUrl(signalr); var httpOptions = new HttpOptions { JwtBearerTokenFactory = signalr.GenerateServerToken <THub> }; for (var i = 0; i < signalr.ConnectionNumber; i++) { var serviceConnection = CreateServiceConnection(serviceUrl, httpOptions); _serviceConnections.Add(serviceConnection); } }
public static ServiceClientProxy CreateAllClientsProxy(this SignalR signalr, string hubName) { return(new ServiceClientProxy( $"http://{signalr.HostName}/{signalr.ApiVersion}/hub/{hubName}", () => signalr.GenerateServerToken(hubName))); }
public static ServiceClientProxy CreateMultipleGroupProxy(this SignalR signalr, string hubName, IReadOnlyList <string> groupNames) { return(new ServiceClientProxy( $"http://{signalr.HostName}/{signalr.ApiVersion}/hub/{hubName}/groups/{string.Join(",", groupNames)}", () => signalr.GenerateServerToken(hubName))); }
public static ServiceClientProxy CreateSingleUserProxy(this SignalR signalr, string hubName, string userId) { return(new ServiceClientProxy( $"http://{signalr.HostName}/{signalr.ApiVersion}/hub/{hubName}/user/{userId}", () => signalr.GenerateServerToken(hubName))); }
public HubServerBuilder(IServiceProvider serviceProvider, SignalR signalr) { _serviceProvider = serviceProvider; _signalr = signalr; }
public HubProxy(SignalR signalr, string hubName) { _signalr = signalr; HubName = hubName; All = _signalr.CreateAllClientsProxy(HubName); }
private Uri GetServiceUrl(SignalR signalr) { return(new Uri(signalr.GetServerUrl <THub>())); }