There is Prefixes
field in HttpListener
. You can add some string like "http://+:8080/" and your application just process all queries to 8080 port.
I have HttpSelfHostServer
it can use only valid Uri string like input to it HttpSelfHostConfiguration
class. I want to get same behaviour in my HttpSelfHostServer
like in HttpListener
with prefixes like:
http://*:8080/
And so on...
...
var configuration = new HttpSelfHostConfiguration(prefix)
var server = new HttpSelfHostServer(configuration);
...