Modified WebSocketServer.cs and removed WebSocketServerBase.cs
This commit is contained in:
@@ -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 ();
|
||||
|
Reference in New Issue
Block a user