Modified WebSocketServer.cs and removed WebSocketServerBase.cs

This commit is contained in:
sta
2013-10-14 20:38:15 +09:00
parent 3488308b29
commit cbf73e9865
8 changed files with 411 additions and 668 deletions

View File

@@ -19,9 +19,9 @@ namespace Example3
_httpsv.Log.Level = LogLevel.TRACE;
#endif
_httpsv.RootPath = ConfigurationManager.AppSettings ["RootPath"];
//var certFile = ConfigurationManager.AppSettings ["ServerCertFile"];
//var cert = ConfigurationManager.AppSettings ["ServerCertFile"];
//var password = ConfigurationManager.AppSettings ["CertFilePassword"];
//_httpsv.Certificate = new X509Certificate2 (certFile, password);
//_httpsv.Certificate = new X509Certificate2 (cert, password);
//_httpsv.KeepClean = false;
_httpsv.AddWebSocketService<Echo> ("/Echo");
_httpsv.AddWebSocketService<Chat> ("/Chat");
@@ -35,14 +35,14 @@ namespace Example3
_httpsv.Start ();
if (_httpsv.IsListening)
{
Console.WriteLine ("An HTTP Server listening on port: {0} service path:", _httpsv.Port);
Console.WriteLine (
"An HTTP Server listening on port: {0} WebSocket service paths:", _httpsv.Port);
foreach (var path in _httpsv.WebSocketServices.ServicePaths)
Console.WriteLine (" {0}", path);
Console.WriteLine ();
}
Console.WriteLine ("Press Enter key to stop the server...");
Console.WriteLine ("\nPress Enter key to stop the server...");
Console.ReadLine ();
_httpsv.Stop ();