moloch
moloch2y ago

Is there a way to define the Websocket protocol when using wsLink()

I am attempting to use tRPC with Azure's Pub/Sub Websockets service it appears to require custom protocols to be defined as explained here: https://learn.microsoft.com/en-us/azure/azure-web-pubsub/reference-json-webpubsub-subprotocol They give the following code example:
var pubsub = new WebSocket('wss://test.webpubsub.azure.com/client/hubs/hub1', 'json.webpubsub.azure.v1');
var pubsub = new WebSocket('wss://test.webpubsub.azure.com/client/hubs/hub1', 'json.webpubsub.azure.v1');
How might this be done using:
const client = createWSClient({
url: `wss://test.webpubsub.azure.com/client/hubs/hub1`,
});
const client = createWSClient({
url: `wss://test.webpubsub.azure.com/client/hubs/hub1`,
});
Reference - Azure Web PubSub supported JSON WebSocket subprotocol `...
The reference describes Azure Web PubSub supported WebSocket subprotocol json.webpubsub.azure.v1
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?