diff --git a/websocket-sharp/Net/HttpListener.cs b/websocket-sharp/Net/HttpListener.cs index 2fa8fa00..aaa592ca 100644 --- a/websocket-sharp/Net/HttpListener.cs +++ b/websocket-sharp/Net/HttpListener.cs @@ -140,18 +140,14 @@ namespace WebSocketSharp.Net /// Gets or sets the delegate called to select the scheme used to authenticate the clients. /// /// - /// - /// If you set this property, the listener uses the authentication scheme selected by - /// the delegate for each request. - /// - /// - /// If you don't set, the listener uses the value of the AuthenticationSchemes - /// property as the authentication scheme for all requests. - /// + /// If you set this property, the listener uses the authentication scheme selected by + /// the delegate for each request. Or if you don't set, the listener uses the value of + /// the property as the authentication + /// scheme for all requests. /// /// /// A Func<, > - /// delegate that invokes the method(s) used to select an authentication scheme. The default + /// delegate that references the method used to select an authentication scheme. The default /// value is . /// /// @@ -234,8 +230,8 @@ namespace WebSocketSharp.Net /// sending the response to the client. /// /// - /// true if the listener doesn't return exceptions that occur when sending the response - /// to the client; otherwise, false. The default value is false. + /// true if the listener shouldn't return those exceptions; otherwise, false. + /// The default value is false. /// /// /// This listener has been closed. @@ -297,7 +293,7 @@ namespace WebSocketSharp.Net /// /// /// A that represents the name of the realm. The default value is - /// SECRET AREA. + /// "SECRET AREA". /// /// /// This listener has been closed. @@ -305,9 +301,9 @@ namespace WebSocketSharp.Net public string Realm { get { CheckDisposed (); - return _realm == null || _realm.Length == 0 - ? (_realm = "SECRET AREA") - : _realm; + return _realm != null && _realm.Length > 0 + ? _realm + : (_realm = "SECRET AREA"); } set { @@ -348,7 +344,7 @@ namespace WebSocketSharp.Net /// /// /// A Func<, > delegate - /// that invokes the method used to find the credentials. The default value is a function + /// that references the method used to find the credentials. The default value is a function /// that only returns . /// /// @@ -476,10 +472,10 @@ namespace WebSocketSharp.Net { CheckDisposed (); if (_prefixes.Count == 0) - throw new InvalidOperationException ("AddPrefix must be called before using this method."); + throw new InvalidOperationException ("The listener has no URI prefix on which listens."); if (!_listening) - throw new InvalidOperationException ("Start must be called before using this method."); + throw new InvalidOperationException ("The listener hasn't been started."); // Lock _waitQueue early to avoid race conditions. lock (_waitQueueSync) { @@ -585,7 +581,7 @@ namespace WebSocketSharp.Net /// /// /// - /// This listener doesn't have any URI prefixes to listen on. + /// This listener has no URI prefix on which listens. /// /// /// -or- @@ -681,7 +677,7 @@ namespace WebSocketSharp.Net /// /// /// - /// This listener doesn't have any URI prefixes to listen on. + /// This listener has no URI prefix on which listens. /// /// /// -or-