SignalR - Detect Transport Method for a Connection on Server Side
signalr
Solution
Inside a Hub you can detect the transport being used by looking at the request's query string:
Context.QueryString["transport"]
This will evaluate to "webSockets", "serverSentEvents", "foreverFrame" or "longPolling".
Ideally your code should not depend on which transport is being used since SignalR abstracts that for you. However, this could be useful for logging and such.
Problem
Can you discern on the server side which transport method is being used for a given SignalR connection? (WebSockets, SSE, long polling, etc.?)