angular-signalr-hub icon indicating copy to clipboard operation
angular-signalr-hub copied to clipboard

how to Obtain Signalr Connection Id

Open coommark opened this issue 9 years ago • 1 comments

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.

coommark avatar Mar 20 '15 22:03 coommark

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...

DeBiese avatar Mar 23 '15 06:03 DeBiese