Renamed WebSocketServiceHostManager.cs to WebSocketServiceManager.cs

This commit is contained in:
sta
2014-02-13 16:09:16 +09:00
parent d07265dd8e
commit 353e481f95
4 changed files with 42 additions and 45 deletions

View File

@@ -67,7 +67,7 @@ namespace WebSocketSharp.Server
private string _realm;
private Thread _receiveRequestThread;
private bool _secure;
private WebSocketServiceHostManager _serviceHosts;
private WebSocketServiceManager _services;
private volatile ServerState _state;
private object _sync;
private Uri _uri;
@@ -375,11 +375,11 @@ namespace WebSocketSharp.Server
/// </value>
public bool KeepClean {
get {
return _serviceHosts.KeepClean;
return _services.KeepClean;
}
set {
_serviceHosts.KeepClean = value;
_services.KeepClean = value;
}
}
@@ -456,16 +456,14 @@ namespace WebSocketSharp.Server
}
/// <summary>
/// Gets the access to the WebSocket services provided by the
/// <see cref="WebSocketServer"/>.
/// Gets the access to the WebSocket services provided by the <see cref="WebSocketServer"/>.
/// </summary>
/// <value>
/// A <see cref="WebSocketServiceHostManager"/> that manages the WebSocket
/// services.
/// A <see cref="WebSocketServiceManager"/> that manages the WebSocket services.
/// </value>
public WebSocketServiceHostManager WebSocketServices {
public WebSocketServiceManager WebSocketServices {
get {
return _serviceHosts;
return _services;
}
}
@@ -483,7 +481,7 @@ namespace WebSocketSharp.Server
}
_listener.Stop ();
_serviceHosts.Stop (
_services.Stop (
((ushort) CloseStatusCode.SERVER_ERROR).ToByteArrayInternally (ByteOrder.BIG),
true);
@@ -515,7 +513,7 @@ namespace WebSocketSharp.Server
WebSocketServiceHost host;
if (path == null ||
!_serviceHosts.TryGetServiceHostInternally (path, out host)) {
!_services.TryGetServiceHostInternally (path, out host)) {
context.Close (HttpStatusCode.NotImplemented);
return;
}
@@ -596,7 +594,7 @@ namespace WebSocketSharp.Server
_authSchemes = AuthenticationSchemes.Anonymous;
_listener = new TcpListener (_address, _port);
_logger = new Logger ();
_serviceHosts = new WebSocketServiceHostManager (_logger);
_services = new WebSocketServiceManager (_logger);
_state = ServerState.READY;
_sync = new object ();
}
@@ -728,7 +726,7 @@ namespace WebSocketSharp.Server
if (!KeepClean)
host.KeepClean = false;
_serviceHosts.Add (host.ServicePath, host);
_services.Add (host.ServicePath, host);
}
/// <summary>
@@ -757,7 +755,7 @@ namespace WebSocketSharp.Server
return false;
}
return _serviceHosts.Remove (servicePath);
return _services.Remove (servicePath);
}
/// <summary>
@@ -775,7 +773,7 @@ namespace WebSocketSharp.Server
return;
}
_serviceHosts.Start ();
_services.Start ();
_listener.Start ();
startReceiving ();
@@ -799,7 +797,7 @@ namespace WebSocketSharp.Server
}
stopListener (5000);
_serviceHosts.Stop (new byte [0], true);
_services.Stop (new byte [0], true);
_state = ServerState.STOP;
}
@@ -835,7 +833,7 @@ namespace WebSocketSharp.Server
}
stopListener (5000);
_serviceHosts.Stop (data, !code.IsReserved ());
_services.Stop (data, !code.IsReserved ());
_state = ServerState.STOP;
}
@@ -869,7 +867,7 @@ namespace WebSocketSharp.Server
}
stopListener (5000);
_serviceHosts.Stop (data, !code.IsReserved ());
_services.Stop (data, !code.IsReserved ());
_state = ServerState.STOP;
}