I'm trying to build a small app with azure webpubsub. I based it on this tutorial and I'm using javascript.
I started out by creating a function with a binding to my WebPubSub like so:
{
"disabled": false,
"bindings": [
{
"name": "wpsReq",
"type": "webPubSubContext",
"direction": "in"
},
{
other bindings...
}
]
}
But how do i request the number of clients connected to the instance now? I tried this:
let clients = wpsReq.request.connectionContext.clientConnections.length;
but to no success.
Another way would be through the websocket, but do I have a websocket server when I work with azure webpubsub, and how would i access that?
Thanks in advance for your help.