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

exposing _webui_get_free_port #448

Merged
merged 2 commits into from
Jul 9, 2024
Merged

Conversation

sensiblearts
Copy link
Contributor

I want to select a port dynamically for my custom web server, and I figured that since the code is already in webui.c, just expose it in the headers.

(If this PR is accepted, I have a zig-webui PR with an example app.)

@hassandraga
Copy link
Member

Yes, it's a good idea, but it should be a new wrapper webui_get_free_port() of _webui_get_free_port().
All APIs start by _ means are internal use only.

Just copy any API and tweak it for _webui_get_free_port().

Example

@sensiblearts
Copy link
Contributor Author

I added the wrapper and pushed the changes.

@hassandraga
Copy link
Member

The C++ wrapper needs return but that's fine, I will fix it later. Thank you @sensiblearts for your contribution.

@hassandraga hassandraga merged commit de95086 into webui-dev:main Jul 9, 2024
26 checks passed
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

Successfully merging this pull request may close these issues.

2 participants