Browse Source

Removed ServicePaths property from WebSocketServer class

pull/21/merge
sta 12 years ago
parent
commit
c7a895f530
  1. 14
      Example2/Program.cs
  2. 17
      websocket-sharp/Server/WebSocketServer.cs

14
Example2/Program.cs

@ -4,10 +4,10 @@ using System.Security.Cryptography.X509Certificates;
using WebSocketSharp;
using WebSocketSharp.Server;
namespace Example2 {
public class Program {
namespace Example2
{
public class Program
{
public static void Main (string [] args)
{
/* Single service server
@ -53,12 +53,12 @@ namespace Example2 {
wssv.Start ();
Console.WriteLine (
"WebSocket Server listening on port: {0} service path:", wssv.Port);
foreach (var path in wssv.ServicePaths)
"A WebSocket Server listening on port: {0} service path:", wssv.Port);
foreach (var path in wssv.WebSocketServices.ServicePaths)
Console.WriteLine (" {0}", path);
Console.WriteLine ();
Console.WriteLine ("Press enter key to stop server...");
Console.WriteLine ("Press Enter key to stop server...");
Console.ReadLine ();
wssv.Stop ();

17
websocket-sharp/Server/WebSocketServer.cs

@ -168,23 +168,6 @@ namespace WebSocketSharp.Server
}
}
/// <summary>
/// Gets the collection of each path to the WebSocket services that the server provides.
/// </summary>
/// <value>
/// An IEnumerable&lt;string&gt; that contains the collection of each path to the WebSocket services.
/// </value>
public IEnumerable<string> ServicePaths {
get {
var url = BaseUri.IsAbsoluteUri
? BaseUri.ToString ().TrimEnd ('/')
: String.Empty;
foreach (var path in _serviceHosts.ServicePaths)
yield return url + path;
}
}
/// <summary>
/// Gets the functions for the WebSocket services that the server provides.
/// </summary>

Loading…
Cancel
Save