Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. services.AddSignalR(o => o.EnableDetailedErrors =
  2. true).AddAzureSignalR(connstring);
  3.  
  4. app.UseAzureSignalR(route =>
  5. {
  6. route.MapHub<FooBarHub>("/foobarhub");
  7. });
  8.  
  9. connection = new HubConnectionBuilder().WithUrl($"
  10. {serviceHost}/AgentHub").Build();
  11.  
  12. await connection.StartAsync();
  13.  
  14. string myIdString = await connection.InvokeAsync<string>
  15.  
  16. public string RegisterSignalRId(string foobarId)
  17. {
  18. myService.RegisterSignalRId(this.Context.ConnectionId, foobarId);
  19. return this.Context.ConnectionId;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement