foxglove / ws-protocol

Foxglove Studio WebSocket protocol specification and libraries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add way to verify server setup is complete (C++)

cody-sheff opened this issue · comments

It does not appear that there is currently any way to verify whether or not a server's setup is complete; a function that allows for easily verifying this would be helpful for determining when execution can begin without risk of losing initial data.

Can you say more about what you mean by complete? Do you need information about how many clients have connected/subscribed, or what would constitute a fully set up server in your case?

Information about how many clients have connected/subscribed would probably be sufficient. That way I could pause execution until at least one client has connected and then resume.

Would the existing setSubscribeHandler function work for that purpose? The function you provide will be called the first time a client subscribes to each channel.

That worked for my purposes, thank you so much!