public Server(ServerSettings settings) { this.listenerPrefix = settings.ListenPrefix; this.router = new HttpListenerRouter { {"^/slave$", "PUT", OnPutSlave}, {"^/slave$", "GET", OnGetSlave}, }; }
static void Main(string[] args) { var settings = new ServerSettings() { ListenPrefix = "http://+:4445/" }; var server = new Server(settings); server.Start(); System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite); server.Stop(); }