@@ -145,37 +145,37 @@ public WebSocketServer(System.Net.IPAddress address, int port, bool secure)
145145 #region Public Properties
146146
147147 /// <summary>
148- /// Gets the collection of paths associated with the every WebSocket services that the server provides.
148+ /// Gets or sets a value indicating whether the server cleans up the inactive WebSocket service
149+ /// instances periodically.
149150 /// </summary>
150151 /// <value>
151- /// An IEnumerable<string> that contains the collection of paths.
152+ /// <c>true</c> if the server cleans up the inactive WebSocket service instances every 60 seconds;
153+ /// otherwise, <c>false</c>. The default value is <c>true</c>.
152154 /// </value>
153- public IEnumerable < string > ServicePaths {
155+ public bool KeepClean {
154156 get {
155- var url = BaseUri . IsAbsoluteUri
156- ? BaseUri . ToString ( ) . TrimEnd ( '/' )
157- : String . Empty ;
157+ return _svcHosts . KeepClean ;
158+ }
158159
159- foreach ( var path in _svcHosts . Paths )
160- yield return url + path ;
160+ set {
161+ _svcHosts . KeepClean = value ;
161162 }
162163 }
163164
164165 /// <summary>
165- /// Gets or sets a value indicating whether the server cleans up the inactive WebSocket service
166- /// instances periodically.
166+ /// Gets the collection of paths associated with the every WebSocket services that the server provides.
167167 /// </summary>
168168 /// <value>
169- /// <c>true</c> if the server cleans up the inactive WebSocket service instances every 60 seconds;
170- /// otherwise, <c>false</c>. The default value is <c>true</c>.
169+ /// An IEnumerable<string> that contains the collection of paths.
171170 /// </value>
172- public bool Sweeping {
171+ public IEnumerable < string > ServicePaths {
173172 get {
174- return _svcHosts . Sweeping ;
175- }
173+ var url = BaseUri . IsAbsoluteUri
174+ ? BaseUri . ToString ( ) . TrimEnd ( '/' )
175+ : String . Empty ;
176176
177- set {
178- _svcHosts . Sweeping = value ;
177+ foreach ( var path in _svcHosts . Paths )
178+ yield return url + path ;
179179 }
180180 }
181181
@@ -238,8 +238,8 @@ public void AddWebSocketService<T>(string absPath)
238238 ? new Uri ( BaseUri , absPath )
239239 : absPath . ToUri ( ) ;
240240
241- if ( ! Sweeping )
242- svcHost . Sweeping = false ;
241+ if ( ! KeepClean )
242+ svcHost . KeepClean = false ;
243243
244244 _svcHosts . Add ( absPath , svcHost ) ;
245245 }
0 commit comments