Added a new AddWebSocketService method to the WebSocketServer and HttpServer classes
This commit is contained in:
@@ -25,6 +25,7 @@ namespace Example3
|
||||
//_httpsv.KeepClean = false;
|
||||
_httpsv.AddWebSocketService<Echo> ("/Echo");
|
||||
_httpsv.AddWebSocketService<Chat> ("/Chat");
|
||||
//_httpsv.AddWebSocketService<Chat> ("/Chat", () => new Chat ("Anon#"));
|
||||
|
||||
_httpsv.OnGet += (sender, e) =>
|
||||
{
|
||||
@@ -34,7 +35,7 @@ namespace Example3
|
||||
_httpsv.Start ();
|
||||
if (_httpsv.IsListening)
|
||||
{
|
||||
Console.WriteLine ("HTTP Server listening on port: {0} service path:", _httpsv.Port);
|
||||
Console.WriteLine ("An HTTP Server listening on port: {0} service path:", _httpsv.Port);
|
||||
foreach (var path in _httpsv.WebSocketServices.ServicePaths)
|
||||
Console.WriteLine (" {0}", path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user