parent
f14294387e
commit
a9436bfda8
|
|
@ -24,13 +24,12 @@ public sealed class HttpServer {
|
|||
conf = configuration;
|
||||
listener = new HttpListener();
|
||||
listener.Prefixes.Add($"http://localhost:{port}/");
|
||||
listener.Prefixes.Add($"http://[::1]:{port}/");
|
||||
mainLogger = new(LogOutputTopic.Main, conf);
|
||||
requestLogger = new(LogOutputTopic.Request, conf);
|
||||
}
|
||||
|
||||
public void Start() {
|
||||
mainLogger.Information($"Starting on port {Port} (IPv4+IPv6)...");
|
||||
mainLogger.Information($"Starting on port {Port}...");
|
||||
Assert(listenerTask == null, "Server was already started!");
|
||||
listener.Start();
|
||||
listenerTask = Task.Run(GetContextLoopAsync);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user