question

GregTinney-2719 avatar image
0 Votes"
GregTinney-2719 asked GregTinney-2719 commented

How much work is involved to support Azure Web PubSub client in C++ Application?

Per the documentation, this service is built around WebSockets, which would, in theory allow applications, regardless of language, to add support via an existing WebSockets library.

However, the posted Java/C#/Python examples all rely on Azure-provided PubSub SDKs for client auth and message sending.

Is there any such SDK for C++? If not, is there documentation of the WebSocket packets needed to publish/subscribe to hubs and process message events? I assume this would mainly involve headers and payload formatting for the WebSocket messages?

Our current application uses Azure functions for Server and a C++ application as a client. I just wanted to evaluate if Azure Web PubSub would be a valid solution for real-time messaging between the two.

Thanks,
-greg

c++
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JeanineZhang-MSFT avatar image
0 Votes"
JeanineZhang-MSFT answered GregTinney-2719 commented

Hi,

There is no such SDK for C++. However as far as I'm concerned, maybe you could try to use WebSocket++. For more details, I suggest you could refer to the link: https://github.com/zaphoyd/websocketpp

Best Regards,

Jeanine


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the follup-up Jeanine.

Yeah, I was assuming I would need to use an C++ WebSocket library, which shouldn't be a problem.

I was wondering, however, how much heavy lifting was performed by the "Azure PubSub SDK"s, if one was provided for C++, and, if not, if there was a spec for those SDK functions to support porting the SDK to other languages. It sounds like the answer is "no" on those two counts.

But I'll check out the Java SDK stuff and try to figure it out. Hopefully, that is just wrappers to fill headers/body of individual websocket packets, and can be relatively easy to port to a library of our own in C++. Though, if it's too involved, we might just need to look at other PubSub solutions.

Thanks,
-greg

0 Votes 0 ·