diff --git a/websocket-sharp/Net/HttpListener.cs b/websocket-sharp/Net/HttpListener.cs index aafa11dd..8ed306cd 100644 --- a/websocket-sharp/Net/HttpListener.cs +++ b/websocket-sharp/Net/HttpListener.cs @@ -4,9 +4,10 @@ // // Author: // Gonzalo Paniagua Javier (gonzalo@novell.com) +// sta (sta.blockhead@gmail.com) // // Copyright (c) 2005 Novell, Inc. (http://www.novell.com) -// Copyright (c) 2012-2013 sta.blockhead (sta.blockhead@gmail.com) +// Copyright (c) 2012-2013 sta.blockhead // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -41,7 +42,7 @@ namespace WebSocketSharp.Net { /// public sealed class HttpListener : IDisposable { - #region Fields + #region Private Fields AuthenticationSchemes auth_schemes; AuthenticationSchemeSelector auth_selector; @@ -58,7 +59,7 @@ namespace WebSocketSharp.Net { #endregion - #region Constructor + #region Public Constructors /// /// Initializes a new instance of the class. @@ -75,7 +76,7 @@ namespace WebSocketSharp.Net { #endregion - #region Properties + #region Public Properties /// /// Gets or sets the scheme used to authenticate the clients. @@ -84,9 +85,15 @@ namespace WebSocketSharp.Net { /// One of the values that indicates the scheme used to /// authenticate the clients. The default value is . /// + /// + /// This object has been closed. + /// public AuthenticationSchemes AuthenticationSchemes { - // TODO: Digest, NTLM and Negotiate require ControlPrincipal - get { return auth_schemes; } + // TODO: Digest, NTLM and Negotiate require ControlPrincipal + get { + CheckDisposed (); + return auth_schemes; + } set { CheckDisposed (); auth_schemes = value; @@ -100,16 +107,36 @@ namespace WebSocketSharp.Net { /// A delegate that invokes the method(s) used to select /// an authentication scheme. The default value is . /// + /// + /// This object has been closed. + /// public AuthenticationSchemeSelector AuthenticationSchemeSelectorDelegate { - get { return auth_selector; } + get { + CheckDisposed (); + return auth_selector; + } set { CheckDisposed (); auth_selector = value; } } + /// + /// Gets or sets a value indicating whether the returns exceptions + /// that occur when sending the response to the client. + /// + /// + /// true if does not return exceptions that occur when sending the response to the client; + /// otherwise, false. The default value is false. + /// + /// + /// This object has been closed. + /// public bool IgnoreWriteExceptions { - get { return ignore_write_exceptions; } + get { + CheckDisposed (); + return ignore_write_exceptions; + } set { CheckDisposed (); ignore_write_exceptions = value; @@ -142,6 +169,9 @@ namespace WebSocketSharp.Net { /// /// A that contains the URI prefixes. /// + /// + /// This object has been closed. + /// public HttpListenerPrefixCollection Prefixes { get { CheckDisposed (); @@ -155,18 +185,39 @@ namespace WebSocketSharp.Net { /// /// A that contains the name of the realm. /// + /// + /// This object has been closed. + /// public string Realm { - // TODO: Use this - get { return realm; } + // TODO: Use this + get { + CheckDisposed (); + return realm; + } set { CheckDisposed (); realm = value; } } + /// + /// Gets or sets a value indicating whether, when NTLM authentication is used, + /// the authentication information of first request is used to authenticate + /// additional requests on the same connection. + /// + /// + /// true if the authentication information of first request is used; + /// otherwise, false. The default value is false. + /// + /// + /// This object has been closed. + /// public bool UnsafeConnectionNtlmAuthentication { - // TODO: Support for NTLM needs some loving. - get { return unsafe_ntlm_auth; } + // TODO: Support for NTLM needs some loving. + get { + CheckDisposed (); + return unsafe_ntlm_auth; + } set { CheckDisposed (); unsafe_ntlm_auth = value; @@ -331,22 +382,6 @@ namespace WebSocketSharp.Net { #endregion - #region Explicit Interface Implementation - - /// - /// Releases all resource used by the . - /// - void IDisposable.Dispose () - { - if (disposed) - return; - - Close (true); // TODO: Should we force here or not? - disposed = true; - } - - #endregion - #region Public Methods /// @@ -378,6 +413,9 @@ namespace WebSocketSharp.Net { /// /// An that contains a user defined object to pass to the delegate. /// + /// + /// This object has been closed. + /// /// /// The has not been started or is stopped currently. /// @@ -429,6 +467,9 @@ namespace WebSocketSharp.Net { /// /// An obtained by calling the method. /// + /// + /// This object has been closed. + /// /// /// is . /// @@ -477,7 +518,18 @@ namespace WebSocketSharp.Net { /// A that contains a client's request information. /// /// + /// /// The does not have any URI prefixes to listen on. + /// + /// + /// -or- + /// + /// + /// The has not been started or is stopped currently. + /// + /// + /// + /// This object has been closed. /// public HttpListenerContext GetContext () { @@ -493,6 +545,9 @@ namespace WebSocketSharp.Net { /// /// Starts to receive incoming requests. /// + /// + /// This object has been closed. + /// public void Start () { CheckDisposed (); @@ -506,6 +561,9 @@ namespace WebSocketSharp.Net { /// /// Stops receiving incoming requests. /// + /// + /// This object has been closed. + /// public void Stop () { CheckDisposed (); @@ -518,5 +576,21 @@ namespace WebSocketSharp.Net { } #endregion + + #region Explicit Interface Implementation + + /// + /// Releases all resource used by the . + /// + void IDisposable.Dispose () + { + if (disposed) + return; + + Close (true); // TODO: Should we force here or not? + disposed = true; + } + + #endregion } } diff --git a/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll b/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll index 5a3f9686..c112d413 100755 Binary files a/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll and b/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.xml b/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.xml index c989b4a9..22c0bc82 100644 --- a/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.xml +++ b/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.xml @@ -2141,6 +2141,9 @@ One of the values that indicates the scheme used to authenticate the clients. The default value is . + + This object has been closed. + @@ -2150,6 +2153,22 @@ A delegate that invokes the method(s) used to select an authentication scheme. The default value is . + + This object has been closed. + + + + + Gets or sets a value indicating whether the returns exceptions + that occur when sending the response to the client. + + + true if does not return exceptions that occur when sending the response to the client; + otherwise, false. The default value is false. + + + This object has been closed. + @@ -2174,6 +2193,9 @@ A that contains the URI prefixes. + + This object has been closed. + @@ -2182,6 +2204,23 @@ A that contains the name of the realm. + + This object has been closed. + + + + + Gets or sets a value indicating whether, when NTLM authentication is used, + the authentication information of first request is used to authenticate + additional requests on the same connection. + + + true if the authentication information of first request is used; + otherwise, false. The default value is false. + + + This object has been closed. + @@ -2211,6 +2250,9 @@ An that contains a user defined object to pass to the delegate. + + This object has been closed. + The has not been started or is stopped currently. @@ -2233,6 +2275,9 @@ An obtained by calling the method. + + This object has been closed. + is . @@ -2255,18 +2300,35 @@ A that contains a client's request information. + The does not have any URI prefixes to listen on. + + + -or- + + + The has not been started or is stopped currently. + + + + This object has been closed. Starts to receive incoming requests. + + This object has been closed. + Stops receiving incoming requests. + + This object has been closed. + diff --git a/websocket-sharp/doc/html/WebSocketSharp.Net/HttpListener.html b/websocket-sharp/doc/html/WebSocketSharp.Net/HttpListener.html index 277e81d6..db196525 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Net/HttpListener.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Net/HttpListener.html @@ -300,7 +300,10 @@ bool - . Documentation for this section has not yet been entered. + . + Gets or sets a value indicating whether the WebSocketSharp.Net.HttpListener returns exceptions + that occur when sending the response to the client. + [read-only]
@@ -374,7 +377,11 @@ bool - . Documentation for this section has not yet been entered. + . + Gets or sets a value indicating whether, when NTLM authentication is used, + the authentication information of first request is used to authenticate + additional requests on the same connection. + @@ -502,7 +509,7 @@ IsNull<T> - (this T) : bool
+ (this T) : bool
Determines whether the specified object is null.
@@ -570,6 +577,23 @@ One of the WebSocketSharp.Net.AuthenticationSchemes values that indicates the scheme used to authenticate the clients. The default value is AuthenticationSchemes.Anonymous.
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object has been closed. +
+

Remarks

Documentation for this section has not yet been entered. @@ -591,6 +615,23 @@ A WebSocketSharp.Net.AuthenticationSchemeSelector delegate that invokes the method(s) used to select an authentication scheme. The default value is null. +

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object has been closed. +
+

Remarks

Documentation for this section has not yet been entered. @@ -642,6 +683,14 @@ The WebSocketSharp.Net.HttpListener has not been started or is stopped currently. + + + + + ObjectDisposedException + + + This object has been closed. @@ -723,6 +772,14 @@ The EndGetContext method was already called for the specified asyncResult. + + + + + ObjectDisposedException + + + This object has been closed. @@ -759,7 +816,23 @@ InvalidOperationException +

The WebSocketSharp.Net.HttpListener does not have any URI prefixes to listen on. +

+

+ -or- +

+

+ The WebSocketSharp.Net.HttpListener has not been started or is stopped currently. +

+ + + + + ObjectDisposedException + + + This object has been closed. @@ -777,13 +850,32 @@

IgnoreWriteExceptions Property

- Documentation for this section has not yet been entered. -

+ Gets or sets a value indicating whether the WebSocketSharp.Net.HttpListener returns exceptions + that occur when sending the response to the client. +

Syntax

public bool IgnoreWriteExceptions { get; set; }

Value

- Documentation for this section has not yet been entered. + true if does not return exceptions that occur when sending the response to the client; + otherwise, false. The default value is false. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object has been closed. +

Remarks

@@ -845,6 +937,23 @@
A WebSocketSharp.Net.HttpListenerPrefixCollection that contains the URI prefixes.
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object has been closed. +
+

Remarks

Documentation for this section has not yet been entered. @@ -865,6 +974,23 @@
A string that contains the name of the realm.
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object has been closed. +
+

Remarks

Documentation for this section has not yet been entered. @@ -881,6 +1007,23 @@

Syntax

public void Start ()
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object has been closed. +
+

Remarks

Documentation for this section has not yet been entered. @@ -897,6 +1040,23 @@

Syntax

public void Stop ()
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object has been closed. +
+

Remarks

Documentation for this section has not yet been entered. @@ -926,13 +1086,33 @@

UnsafeConnectionNtlmAuthentication Property

- Documentation for this section has not yet been entered. -

+ Gets or sets a value indicating whether, when NTLM authentication is used, + the authentication information of first request is used to authenticate + additional requests on the same connection. +

Syntax

public bool UnsafeConnectionNtlmAuthentication { get; set; }

Value

- Documentation for this section has not yet been entered. + true if the authentication information of first request is used; + otherwise, false. The default value is false. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object has been closed. +

Remarks

diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpListener.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpListener.xml index 244acf07..7b150a77 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpListener.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpListener.xml @@ -62,6 +62,9 @@ authenticate the clients. The default value is . To be added. + + This object has been closed. + @@ -80,6 +83,9 @@ an authentication scheme. The default value is . To be added. + + This object has been closed. + @@ -114,6 +120,9 @@ The has not been started or is stopped currently. + + This object has been closed. + @@ -163,6 +172,9 @@ The EndGetContext method was already called for the specified . + + This object has been closed. + @@ -185,7 +197,18 @@ when received the request. + The does not have any URI prefixes to listen on. + + + -or- + + + The has not been started or is stopped currently. + + + + This object has been closed. @@ -197,9 +220,18 @@ System.Boolean - To be added. - To be added. + + Gets or sets a value indicating whether the returns exceptions + that occur when sending the response to the client. + + + true if does not return exceptions that occur when sending the response to the client; + otherwise, false. The default value is false. + To be added. + + This object has been closed. + @@ -251,6 +283,9 @@ A that contains the URI prefixes. To be added. + + This object has been closed. + @@ -268,6 +303,9 @@ A that contains the name of the realm. To be added. + + This object has been closed. + @@ -283,6 +321,9 @@ Starts to receive incoming requests.
To be added. + + This object has been closed. +
@@ -298,6 +339,9 @@ Stops receiving incoming requests.
To be added. + + This object has been closed. +
@@ -323,9 +367,19 @@ System.Boolean - To be added. - To be added. + + Gets or sets a value indicating whether, when NTLM authentication is used, + the authentication information of first request is used to authenticate + additional requests on the same connection. + + + true if the authentication information of first request is used; + otherwise, false. The default value is false. + To be added. + + This object has been closed. + diff --git a/websocket-sharp/doc/mdoc/index.xml b/websocket-sharp/doc/mdoc/index.xml index 6bff0398..1b30a8c8 100644 --- a/websocket-sharp/doc/mdoc/index.xml +++ b/websocket-sharp/doc/mdoc/index.xml @@ -1,6 +1,6 @@ - + [00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 11 00 00 00 29 17 fb 89 fe c3 91 f7 2b cb 8b e2 61 d2 3f 05 93 6d 65 a8 9e 63 72 a6 f5 d5 2c f2 9d 20 fa 0b c0 70 6a f6 88 7e 8b 90 3f 39 f5 76 c8 48 e0 bb 7b b2 7b ed d3 10 a7 1a 0f 70 98 0f 7f f4 4b 53 09 d2 a5 ef 36 c3 56 b4 aa f0 91 72 63 25 07 89 e0 93 3e 3f 2e f2 b9 73 0e 12 15 5d 43 56 c3 f4 70 a5 89 fe f7 f6 ac 3e 77 c2 d8 d0 84 91 f4 0c d1 f3 8e dc c3 c3 b8 38 3d 0c bf 17 de 20 78 c1 ]