I have ASP.NET Core 2.1 real-time (signalr) web application & .NET Framework client. I made simple detecting, what transport type uses in connection.
Client-side:
MessageBox.Show($“Client Listener: {ClientHandlerConnection.State} [{await ClientHandlerConnection.InvokeAsync(“GetTransportType”)}]\nReport Listener: {ReportHandleConnection.State} [{await ReportHandleConnection.InvokeAsync(“GetTransportType”)}]\nBotNet System: -”);
GetTransportType on server-side:
public string GetTransportType()
{
return Context.Features.Get().TransportType.ToString();
}
When i testing connection on windows localhost, GetTransportType returns [WebSockets]
Wnen i testing connection on Glitch, GetTransportType returns [ServerSentEvents]
SSE works bad, after a while client can’t receive data from server. I really need websocket connection, but i don’t know how to configure it. Help please.