In the JavaScript client API you should use the
onStatusChange event of ClientListener to be informed about the change of connection status.
The range of event is DISCONNECTED, CONNECTING, and CONNECTED. Among CONNECTED status you can distinguish between the cases:
- "CONNECTED:STREAM-SENSE"
- "CONNECTED:WS-STREAMING"
- "CONNECTED:HTTP-STREAMING"
- "CONNECTED:WS-POLLING"
- "CONNECTED:HTTP-POLLING"
Plese refer to the API reference for full details. I confirm you that the streaming mode can be both over WebSockets or HTTP (please refer to
these slides from 14).
In .NET client API, you are right, the information is retrieved by the
OnSessionStarted of IConnectionListener and you can only discriminate between the polling or streaming cases (please note that at the moment the .NET client library does not support WebSockets).