Open BrennanConroy opened 5 years ago
Hey @BrennanConroy i'll try to grab that Can you get me started with some pin points?
Sure, the general idea is that we want to first get the negotiate response from the server which can include multiple transports, then we'll loop over all of the transports the client can use and check that the server supports them too and see if the client connects with that transport. If it throws we log and try the next one, repeat until all transports are tried and either we stop on a successful one, or return some sort of error to the user.
Most of the Typescript client code for an example is: https://github.com/dotnet/aspnetcore/blob/5223b497fe578b1c239a454a46e464866069a4dc/src/SignalR/clients/ts/signalr/src/HttpConnection.ts#L376-L408
And for the .NET Client: https://github.com/dotnet/aspnetcore/blob/5223b497fe578b1c239a454a46e464866069a4dc/src/SignalR/clients/csharp/Http.Connections.Client/src/HttpConnection.cs#L365-L424
We added the LongPolling transport to the Java client in https://github.com/aspnet/AspNetCore/pull/6856
But it currently doesn't do fallback, so the client either connects with the selected transport or it doesn't.