From 174ff5eb070c9b6d5c9d738e74433b791d9311ed Mon Sep 17 00:00:00 2001 From: sta Date: Sat, 28 May 2016 15:37:41 +0900 Subject: [PATCH] [Modify] Add some examples to create a new server instance --- Example3/Program.cs | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/Example3/Program.cs b/Example3/Program.cs index dad6e5f6..66fec34e 100644 --- a/Example3/Program.cs +++ b/Example3/Program.cs @@ -19,10 +19,33 @@ namespace Example3 var httpsv = new HttpServer (4649); //var httpsv = new HttpServer (5963, true); - //var httpsv = new HttpServer (System.Net.IPAddress.Parse ("127.0.0.1"), 4649); - //var httpsv = new HttpServer (System.Net.IPAddress.Parse ("127.0.0.1"), 5963, true); + + //var httpsv = new HttpServer (System.Net.IPAddress.Any, 4649); + //var httpsv = new HttpServer (System.Net.IPAddress.Any, 5963, true); + + //var httpsv = new HttpServer (System.Net.IPAddress.IPv6Any, 4649); + //var httpsv = new HttpServer (System.Net.IPAddress.IPv6Any, 5963, true); + + //var httpsv = new HttpServer ("http://0.0.0.0:4649"); + //var httpsv = new HttpServer ("https://0.0.0.0:5963"); + + //var httpsv = new HttpServer ("http://[::0]:4649"); + //var httpsv = new HttpServer ("https://[::0]:5963"); + + //var httpsv = new HttpServer (System.Net.IPAddress.Loopback, 4649); + //var httpsv = new HttpServer (System.Net.IPAddress.Loopback, 5963, true); + + //var httpsv = new HttpServer (System.Net.IPAddress.IPv6Loopback, 4649); + //var httpsv = new HttpServer (System.Net.IPAddress.IPv6Loopback, 5963, true); + //var httpsv = new HttpServer ("http://localhost:4649"); //var httpsv = new HttpServer ("https://localhost:5963"); + + //var httpsv = new HttpServer ("http://127.0.0.1:4649"); + //var httpsv = new HttpServer ("https://127.0.0.1:5963"); + + //var httpsv = new HttpServer ("http://[::1]:4649"); + //var httpsv = new HttpServer ("https://[::1]:5963"); #if DEBUG // To change the logging level. httpsv.Log.Level = LogLevel.Trace;