Exemple #1
0
 public Server(ServerSettings settings)
 {
     this.listenerPrefix = settings.ListenPrefix;
     this.router = new HttpListenerRouter
     {
         {"^/slave$", "PUT", OnPutSlave},
         {"^/slave$", "GET", OnGetSlave},
     };
 }
Exemple #2
0
        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();
        }