Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Can GCDWebserver support random port number in specified range? #553

Open
jeffery812 opened this issue Jul 6, 2021 · 0 comments
Open

Can GCDWebserver support random port number in specified range? #553

jeffery812 opened this issue Jul 6, 2021 · 0 comments

Comments

@jeffery812
Copy link

jeffery812 commented Jul 6, 2021

I know if we don't specify the port number when starting the web server, it will use a random port number.

try webServer.start(options: [
                //GCDWebServerOption_Port: 56765,
                GCDWebServerOption_BindToLocalhost: true,
                GCDWebServerOption_AutomaticallySuspendInBackground: false])

Can we set the port number range somehow?
E.g. GCDWebser picks up a port number randomly from these 9899|8080|49651|50332|52703|53444|56765|59846|60427|61908|64339 numbers only?

try webServer.start(options: [
                GCDWebServerOption_Ports: [9899,8080,49651,50332,52703,53444,56765,59846,60427,61908,64339],
                GCDWebServerOption_BindToLocalhost: true,
                GCDWebServerOption_AutomaticallySuspendInBackground: false])
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant