Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write access to server settings prohibited by const in version 1.1 #16

Open
TE-JoakimElvander opened this issue Jul 31, 2023 · 3 comments

Comments

@TE-JoakimElvander
Copy link

Hi,
I'm using your code in a program where the server address and port may be provided externally, and with 1.0 I could change the UTurboLinkGrpcConfig structure easily and it would connect to the server and port provided by other means than through the settings.

In 1.1 you declared the functions retrieving this structure as const, which now means that I have to const_cast<UTurboLinkGrpcConfig*> to remove the constness and change the value.

This is not really a problem for me, but I thought you might want to know that not all usages of your code relies on the specific project settings/ default INI for server and port as your code assumes, and you maybe want to introduce a controlled means of changing it through code if you have plans relying on the constness of the config :)

@thejinchao
Copy link
Owner

Thank you for your suggestion. Indeed, when I designed this library, it was based on an assumption that the content in config is read-only in the code and blueprint. Users need to edit it through the setting ui.

@TE-JoakimElvander
Copy link
Author

Thanks for considering it in the future!
Just to give some context, in my case the endpoint address is actually coming through a redirect from a CMS system to a dedicated server for a certain stream on AWS. So it can never be set up through settings as the server address as the instance is created somewhat dynamically.
Another potential use-case (although not for me), is when the address is needed to be set through an in-game UI...

@thejinchao
Copy link
Owner

I'm sorry because I can only invest a relatively small amount of time in this plugin, so the reply is slow. I just upgraded the libraries to a new version. I will consider your needs next. Thank you for your advice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants