how to Obtain Signalr Connection Id
Opened this issue · 1 comments
coommark commented
I have attempted to obtain the signalr connection Id without success.
When I do this : var conn = hub.connection; and console.log(conn); I see the id of the connection in the log, its something like this: id: "235ds-sdre65-sfde3d-sfd4rs" but when I do
var conn = hub.connection.id and log it, its says id is undefined.
How do I obtain it? I can obtain all the other fields of the connection except id and token.
DeBiese commented
Can you show this with a complete example? At what time to you try to call the hub.connection.id? It should work. But only if your hub is ready and connected ofcourse...