diff --git a/Example/bin/Debug/example.exe b/Example/bin/Debug/example.exe index dcfd957b..d8ffb3f9 100755 Binary files a/Example/bin/Debug/example.exe and b/Example/bin/Debug/example.exe differ diff --git a/Example/bin/Debug/example.exe.mdb b/Example/bin/Debug/example.exe.mdb index 449f7973..1c21d179 100644 Binary files a/Example/bin/Debug/example.exe.mdb and b/Example/bin/Debug/example.exe.mdb differ diff --git a/Example/bin/Debug/websocket-sharp.dll b/Example/bin/Debug/websocket-sharp.dll index 4f518365..83633d5d 100755 Binary files a/Example/bin/Debug/websocket-sharp.dll and b/Example/bin/Debug/websocket-sharp.dll differ diff --git a/Example/bin/Debug/websocket-sharp.dll.mdb b/Example/bin/Debug/websocket-sharp.dll.mdb index 2aad9676..3497ca5c 100644 Binary files a/Example/bin/Debug/websocket-sharp.dll.mdb and b/Example/bin/Debug/websocket-sharp.dll.mdb differ diff --git a/Example/bin/Debug_Ubuntu/example.exe b/Example/bin/Debug_Ubuntu/example.exe index 66ee888a..5f480fee 100755 Binary files a/Example/bin/Debug_Ubuntu/example.exe and b/Example/bin/Debug_Ubuntu/example.exe differ diff --git a/Example/bin/Debug_Ubuntu/example.exe.mdb b/Example/bin/Debug_Ubuntu/example.exe.mdb index 8a76659b..1bec63f1 100644 Binary files a/Example/bin/Debug_Ubuntu/example.exe.mdb and b/Example/bin/Debug_Ubuntu/example.exe.mdb differ diff --git a/Example/bin/Debug_Ubuntu/websocket-sharp.dll b/Example/bin/Debug_Ubuntu/websocket-sharp.dll index c0b1212e..58f0052b 100755 Binary files a/Example/bin/Debug_Ubuntu/websocket-sharp.dll and b/Example/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/Example/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/Example/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index 2a1a234f..77047401 100644 Binary files a/Example/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/Example/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/Example/bin/Release/example.exe b/Example/bin/Release/example.exe index da023714..a45ea0b1 100755 Binary files a/Example/bin/Release/example.exe and b/Example/bin/Release/example.exe differ diff --git a/Example/bin/Release/websocket-sharp.dll b/Example/bin/Release/websocket-sharp.dll index 82be0547..b0dae019 100755 Binary files a/Example/bin/Release/websocket-sharp.dll and b/Example/bin/Release/websocket-sharp.dll differ diff --git a/Example/bin/Release_Ubuntu/example.exe b/Example/bin/Release_Ubuntu/example.exe index 76d03f24..803691fc 100755 Binary files a/Example/bin/Release_Ubuntu/example.exe and b/Example/bin/Release_Ubuntu/example.exe differ diff --git a/Example/bin/Release_Ubuntu/websocket-sharp.dll b/Example/bin/Release_Ubuntu/websocket-sharp.dll index 32c7c8b9..25a32dc9 100755 Binary files a/Example/bin/Release_Ubuntu/websocket-sharp.dll and b/Example/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/Example1/bin/Debug/example1.exe b/Example1/bin/Debug/example1.exe index 7790c277..61e2c478 100755 Binary files a/Example1/bin/Debug/example1.exe and b/Example1/bin/Debug/example1.exe differ diff --git a/Example1/bin/Debug/example1.exe.mdb b/Example1/bin/Debug/example1.exe.mdb index 1663bdc8..53e6df74 100644 Binary files a/Example1/bin/Debug/example1.exe.mdb and b/Example1/bin/Debug/example1.exe.mdb differ diff --git a/Example1/bin/Debug/websocket-sharp.dll b/Example1/bin/Debug/websocket-sharp.dll index 4f518365..83633d5d 100755 Binary files a/Example1/bin/Debug/websocket-sharp.dll and b/Example1/bin/Debug/websocket-sharp.dll differ diff --git a/Example1/bin/Debug/websocket-sharp.dll.mdb b/Example1/bin/Debug/websocket-sharp.dll.mdb index 2aad9676..3497ca5c 100644 Binary files a/Example1/bin/Debug/websocket-sharp.dll.mdb and b/Example1/bin/Debug/websocket-sharp.dll.mdb differ diff --git a/Example1/bin/Debug_Ubuntu/example1.exe b/Example1/bin/Debug_Ubuntu/example1.exe index bb2fad40..038d8852 100755 Binary files a/Example1/bin/Debug_Ubuntu/example1.exe and b/Example1/bin/Debug_Ubuntu/example1.exe differ diff --git a/Example1/bin/Debug_Ubuntu/example1.exe.mdb b/Example1/bin/Debug_Ubuntu/example1.exe.mdb index 30bb111a..63193eaa 100644 Binary files a/Example1/bin/Debug_Ubuntu/example1.exe.mdb and b/Example1/bin/Debug_Ubuntu/example1.exe.mdb differ diff --git a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll b/Example1/bin/Debug_Ubuntu/websocket-sharp.dll index c0b1212e..58f0052b 100755 Binary files a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll and b/Example1/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/Example1/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index 2a1a234f..77047401 100644 Binary files a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/Example1/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/Example1/bin/Release/example1.exe b/Example1/bin/Release/example1.exe index 23fc8112..a472a265 100755 Binary files a/Example1/bin/Release/example1.exe and b/Example1/bin/Release/example1.exe differ diff --git a/Example1/bin/Release/websocket-sharp.dll b/Example1/bin/Release/websocket-sharp.dll index 82be0547..b0dae019 100755 Binary files a/Example1/bin/Release/websocket-sharp.dll and b/Example1/bin/Release/websocket-sharp.dll differ diff --git a/Example1/bin/Release_Ubuntu/example1.exe b/Example1/bin/Release_Ubuntu/example1.exe index 105456f5..0a731e85 100755 Binary files a/Example1/bin/Release_Ubuntu/example1.exe and b/Example1/bin/Release_Ubuntu/example1.exe differ diff --git a/Example1/bin/Release_Ubuntu/websocket-sharp.dll b/Example1/bin/Release_Ubuntu/websocket-sharp.dll index 32c7c8b9..25a32dc9 100755 Binary files a/Example1/bin/Release_Ubuntu/websocket-sharp.dll and b/Example1/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/Example2/Example2.pidb b/Example2/Example2.pidb index b7225fcd..5ce8a32a 100644 Binary files a/Example2/Example2.pidb and b/Example2/Example2.pidb differ diff --git a/Example2/Program.cs b/Example2/Program.cs index 8275fcd9..ab4e704c 100644 --- a/Example2/Program.cs +++ b/Example2/Program.cs @@ -32,10 +32,10 @@ namespace Example2 var wssv = new WebSocketServer(4649); //var wssv = new WebSocketServer("ws://localhost:4649"); //wssv.Sweeped = false; // Stop the Sweep inactive session Timer. - wssv.AddService("/Echo"); - wssv.AddService("/Chat"); - //wssv.AddService("/エコー"); - //wssv.AddService("/チャット"); + wssv.AddWebSocketService("/Echo"); + wssv.AddWebSocketService("/Chat"); + //wssv.AddWebSocketService("/エコー"); + //wssv.AddWebSocketService("/チャット"); wssv.Start(); Console.WriteLine( diff --git a/Example2/bin/Debug/example2.exe b/Example2/bin/Debug/example2.exe index 009e9280..d09c757a 100755 Binary files a/Example2/bin/Debug/example2.exe and b/Example2/bin/Debug/example2.exe differ diff --git a/Example2/bin/Debug/example2.exe.mdb b/Example2/bin/Debug/example2.exe.mdb index ddc7443a..974656f4 100644 Binary files a/Example2/bin/Debug/example2.exe.mdb and b/Example2/bin/Debug/example2.exe.mdb differ diff --git a/Example2/bin/Debug/websocket-sharp.dll b/Example2/bin/Debug/websocket-sharp.dll index 4f518365..83633d5d 100755 Binary files a/Example2/bin/Debug/websocket-sharp.dll and b/Example2/bin/Debug/websocket-sharp.dll differ diff --git a/Example2/bin/Debug/websocket-sharp.dll.mdb b/Example2/bin/Debug/websocket-sharp.dll.mdb index 2aad9676..3497ca5c 100644 Binary files a/Example2/bin/Debug/websocket-sharp.dll.mdb and b/Example2/bin/Debug/websocket-sharp.dll.mdb differ diff --git a/Example2/bin/Debug_Ubuntu/example2.exe b/Example2/bin/Debug_Ubuntu/example2.exe index 4fe08ef5..a253ba56 100755 Binary files a/Example2/bin/Debug_Ubuntu/example2.exe and b/Example2/bin/Debug_Ubuntu/example2.exe differ diff --git a/Example2/bin/Debug_Ubuntu/example2.exe.mdb b/Example2/bin/Debug_Ubuntu/example2.exe.mdb index 1dcb40b7..7646a826 100644 Binary files a/Example2/bin/Debug_Ubuntu/example2.exe.mdb and b/Example2/bin/Debug_Ubuntu/example2.exe.mdb differ diff --git a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll b/Example2/bin/Debug_Ubuntu/websocket-sharp.dll index c0b1212e..58f0052b 100755 Binary files a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll and b/Example2/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/Example2/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index 2a1a234f..77047401 100644 Binary files a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/Example2/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/Example2/bin/Release/example2.exe b/Example2/bin/Release/example2.exe index b93f7231..571c58bf 100755 Binary files a/Example2/bin/Release/example2.exe and b/Example2/bin/Release/example2.exe differ diff --git a/Example2/bin/Release/websocket-sharp.dll b/Example2/bin/Release/websocket-sharp.dll index 82be0547..b0dae019 100755 Binary files a/Example2/bin/Release/websocket-sharp.dll and b/Example2/bin/Release/websocket-sharp.dll differ diff --git a/Example2/bin/Release_Ubuntu/example2.exe b/Example2/bin/Release_Ubuntu/example2.exe index fc484631..a0736b00 100755 Binary files a/Example2/bin/Release_Ubuntu/example2.exe and b/Example2/bin/Release_Ubuntu/example2.exe differ diff --git a/Example2/bin/Release_Ubuntu/websocket-sharp.dll b/Example2/bin/Release_Ubuntu/websocket-sharp.dll index 32c7c8b9..25a32dc9 100755 Binary files a/Example2/bin/Release_Ubuntu/websocket-sharp.dll and b/Example2/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/Example3/Example3.pidb b/Example3/Example3.pidb index ae95211c..cf7315be 100644 Binary files a/Example3/Example3.pidb and b/Example3/Example3.pidb differ diff --git a/Example3/Program.cs b/Example3/Program.cs index f077c3fc..2f5654ad 100644 --- a/Example3/Program.cs +++ b/Example3/Program.cs @@ -12,13 +12,13 @@ namespace Example3 public static void Main(string[] args) { _httpsv = new HttpServer(4649); - //_httpsv.Sweeped = false; // Stop the Sweep inactive session Timer. - _httpsv.AddService("/Echo"); - _httpsv.AddService("/Chat"); + //_httpsv.Sweeped = false; + _httpsv.AddWebSocketService("/Echo"); + _httpsv.AddWebSocketService("/Chat"); - _httpsv.OnGet += (sender, e) => + _httpsv.OnResponseToGet += (sender, e) => { - onGet(e.Request, e.Response); + onResponseToGet(e); }; _httpsv.OnError += (sender, e) => @@ -46,9 +46,11 @@ namespace Example3 return _httpsv.GetFile(path); } - private static void onGet(HttpListenerRequest request, HttpListenerResponse response) + private static void onResponseToGet(ResponseEventArgs eventArgs) { - var content = getContent(request.RawUrl); + var request = eventArgs.Request; + var response = eventArgs.Response; + var content = getContent(request.RawUrl); if (content != null) { response.WriteContent(content); diff --git a/Example3/bin/Debug/Example3.exe b/Example3/bin/Debug/Example3.exe index e0c67b70..39c79793 100755 Binary files a/Example3/bin/Debug/Example3.exe and b/Example3/bin/Debug/Example3.exe differ diff --git a/Example3/bin/Debug/Example3.exe.mdb b/Example3/bin/Debug/Example3.exe.mdb index 53036871..803daffb 100644 Binary files a/Example3/bin/Debug/Example3.exe.mdb and b/Example3/bin/Debug/Example3.exe.mdb differ diff --git a/Example3/bin/Debug/websocket-sharp.dll b/Example3/bin/Debug/websocket-sharp.dll index 4f518365..83633d5d 100755 Binary files a/Example3/bin/Debug/websocket-sharp.dll and b/Example3/bin/Debug/websocket-sharp.dll differ diff --git a/Example3/bin/Debug/websocket-sharp.dll.mdb b/Example3/bin/Debug/websocket-sharp.dll.mdb index 2aad9676..3497ca5c 100644 Binary files a/Example3/bin/Debug/websocket-sharp.dll.mdb and b/Example3/bin/Debug/websocket-sharp.dll.mdb differ diff --git a/Example3/bin/Debug_Ubuntu/Example3.exe b/Example3/bin/Debug_Ubuntu/Example3.exe index 2de6219f..e8670ce7 100755 Binary files a/Example3/bin/Debug_Ubuntu/Example3.exe and b/Example3/bin/Debug_Ubuntu/Example3.exe differ diff --git a/Example3/bin/Debug_Ubuntu/Example3.exe.mdb b/Example3/bin/Debug_Ubuntu/Example3.exe.mdb index bb36e156..667cde9d 100644 Binary files a/Example3/bin/Debug_Ubuntu/Example3.exe.mdb and b/Example3/bin/Debug_Ubuntu/Example3.exe.mdb differ diff --git a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll b/Example3/bin/Debug_Ubuntu/websocket-sharp.dll index c0b1212e..58f0052b 100755 Binary files a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll and b/Example3/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/Example3/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index 2a1a234f..77047401 100644 Binary files a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/Example3/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/Example3/bin/Release/Example3.exe b/Example3/bin/Release/Example3.exe index 931a8c08..063e3ad7 100755 Binary files a/Example3/bin/Release/Example3.exe and b/Example3/bin/Release/Example3.exe differ diff --git a/Example3/bin/Release/websocket-sharp.dll b/Example3/bin/Release/websocket-sharp.dll index 82be0547..b0dae019 100755 Binary files a/Example3/bin/Release/websocket-sharp.dll and b/Example3/bin/Release/websocket-sharp.dll differ diff --git a/Example3/bin/Release_Ubuntu/Example3.exe b/Example3/bin/Release_Ubuntu/Example3.exe index bdfdb184..fb0ba959 100755 Binary files a/Example3/bin/Release_Ubuntu/Example3.exe and b/Example3/bin/Release_Ubuntu/Example3.exe differ diff --git a/Example3/bin/Release_Ubuntu/websocket-sharp.dll b/Example3/bin/Release_Ubuntu/websocket-sharp.dll index 32c7c8b9..25a32dc9 100755 Binary files a/Example3/bin/Release_Ubuntu/websocket-sharp.dll and b/Example3/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/README.md b/README.md index 4e1a3cbd..bb3bd0ba 100644 --- a/README.md +++ b/README.md @@ -202,11 +202,11 @@ Creating a instance of the `WebSocketServer` class if you want the multi WebSock ```cs var wssv = new WebSocketServer(4649); -wssv.AddService("/Echo"); -wssv.AddService("/Chat"); +wssv.AddWebSocketService("/Echo"); +wssv.AddWebSocketService("/Chat"); ``` -You can add to your `WebSocketServer` any WebSocket service and a matching path to that service by using the `WebSocketServer.AddService` method. +You can add to your `WebSocketServer` any WebSocket service and a matching path to that service by using the `WebSocketServer.AddWebSocketService` method. The type of `T` inherits `WebSocketService` class, so you can use a class that was created in **Step 2**. @@ -256,11 +256,11 @@ wssv.Stop(); I modified the `System.Net.HttpListener`, `System.Net.HttpListenerContext` and some other classes of [Mono] to create the HTTP server that can upgrade the connection to the WebSocket connection when receives a WebSocket request. -You can add to your `HttpServer` any WebSocket service and a matching path to that service by using the `HttpServer.AddService` method. +You can add to your `HttpServer` any WebSocket service and a matching path to that service by using the `HttpServer.AddWebSocketService` method. ```cs var httpsv = new HttpServer(4649); -httpsv.AddService("/"); +httpsv.AddWebSocketService("/"); ``` For more information, please refer to the [Example3]. diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index 6415453a..baf2f63f 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -278,13 +278,13 @@ namespace WebSocketSharp { } /// - /// Gets the description of the HTTP status code using the specified code. + /// Gets the description of the HTTP status code using the specified . /// /// - /// A that contains the description of the . + /// A that contains the description of the HTTP status code. /// /// - /// One of values that contains the HTTP status code. + /// One of values that contains an HTTP status code. /// public static string GetDescription(this HttpStatusCode code) { @@ -339,13 +339,13 @@ namespace WebSocketSharp { } /// - /// Gets the description of the HTTP status code using the specified code. + /// Gets the description of the HTTP status code using the specified . /// /// - /// A that contains the description of the . + /// A that contains the description of the HTTP status code. /// /// - /// An that contains the HTTP status code. + /// An that contains an HTTP status code. /// public static string GetStatusDescription(this int code) { diff --git a/websocket-sharp/Net/HttpStatusCode.cs b/websocket-sharp/Net/HttpStatusCode.cs index 81f03051..6394aee5 100644 --- a/websocket-sharp/Net/HttpStatusCode.cs +++ b/websocket-sharp/Net/HttpStatusCode.cs @@ -33,53 +33,331 @@ namespace WebSocketSharp.Net { + /// + /// Contains the values of the HTTP status codes. + /// + /// + /// The HttpStatusCode enumeration contains the values of the HTTP status codes defined in + /// RFC 2616 for HTTP 1.1. + /// public enum HttpStatusCode { + /// + /// Equivalent to status code 100. Indicates that the client should continue with its request. + /// Continue = 100, + + /// + /// Equivalent to status code 101. Indicates that the server is switching the HTTP version or protocol on the connection. + /// SwitchingProtocols = 101, + + /// + /// Equivalent to status code 200. Indicates that the client's request has succeeded. + /// OK = 200, + + /// + /// Equivalent to status code 201. Indicates that the client's request has been fulfilled + /// and resulted in a new resource being created. + /// Created = 201, + + /// + /// Equivalent to status code 202. Indicates that the client's request has been accepted for processing, + /// but the processing has not been completed. + /// Accepted = 202, + + /// + /// Equivalent to status code 203. Indicates that the returned metainformation is from a local or a third-party copy instead of the origin server. + /// NonAuthoritativeInformation = 203, + + /// + /// Equivalent to status code 204. Indicates that the server has fulfilled the client's request + /// but does not need to return an entity-body. + /// NoContent = 204, + + /// + /// Equivalent to status code 205. Indicates that the server has fulfilled the client's request + /// and the user agent should reset the document view which caused the request to be sent. + /// ResetContent = 205, + + /// + /// Equivalent to status code 206. Indicates that the server has fulfilled the partial GET request for the resource. + /// PartialContent = 206, + + /// + /// + /// Equivalent to status code 300. Indicates that the requested resource corresponds to + /// any one of multiple representations. + /// + /// + /// MultipleChoices is a synonym for Ambiguous. + /// + /// MultipleChoices = 300, + + /// + /// + /// Equivalent to status code 300. Indicates that the requested resource corresponds to + /// any one of multiple representations. + /// + /// + /// Ambiguous is a synonym for MultipleChoices. + /// + /// Ambiguous = 300, + + /// + /// + /// Equivalent to status code 301. Indicates that the requested resource has been assigned a new permanent URI + /// and any future references to this resource should use one of the returned URIs. + /// + /// + /// MovedPermanently is a synonym for Moved. + /// + /// MovedPermanently = 301, + + /// + /// + /// Equivalent to status code 301. Indicates that the requested resource has been assigned a new permanent URI + /// and any future references to this resource should use one of the returned URIs. + /// + /// + /// Moved is a synonym for MovedPermanently. + /// + /// Moved = 301, + + /// + /// + /// Equivalent to status code 302. Indicates that the requested resource is located temporarily + /// under a different URI. + /// + /// + /// Found is a synonym for Redirect. + /// + /// Found = 302, + + /// + /// + /// Equivalent to status code 302. Indicates that the requested resource is located temporarily + /// under a different URI. + /// + /// + /// Redirect is a synonym for Found. + /// + /// Redirect = 302, + + /// + /// + /// Equivalent to status code 303. Indicates that the response to the request can be found + /// under a different URI and should be retrieved using a GET method on that resource. + /// + /// + /// SeeOther is a synonym for RedirectMethod. + /// + /// SeeOther = 303, + + /// + /// + /// Equivalent to status code 303. Indicates that the response to the request can be found + /// under a different URI and should be retrieved using a GET method on that resource. + /// + /// + /// RedirectMethod is a synonym for SeeOther. + /// + /// RedirectMethod = 303, + + /// + /// Equivalent to status code 304. Indicates that the client has performed a conditional GET request + /// and access is allowed, but the document has not been modified. + /// NotModified = 304, + + /// + /// Equivalent to status code 305. Indicates that the requested resource must be accessed + /// through the proxy given by the Location field. + /// UseProxy = 305, + + /// + /// Equivalent to status code 306. This code was used in a previous version of the specification, + /// is no longer used, and is reserved for future use. + /// Unused = 306, + + /// + /// + /// Equivalent to status code 307. Indicates that the requested resource is located temporarily + /// under a different URI. + /// + /// + /// TemporaryRedirect is a synonym for RedirectKeepVerb. + /// + /// TemporaryRedirect = 307, + + /// + /// + /// Equivalent to status code 307. Indicates that the requested resource is located temporarily + /// under a different URI. + /// + /// + /// RedirectKeepVerb is a synonym for TemporaryRedirect. + /// + /// RedirectKeepVerb = 307, + + /// + /// Equivalent to status code 400. Indicates that the client's request could not be understood + /// by the server due to malformed syntax. + /// BadRequest = 400, + + /// + /// Equivalent to status code 401. Indicates that the client's request requires user authentication. + /// Unauthorized = 401, + + /// + /// Equivalent to status code 402. This code is reserved for future use. + /// PaymentRequired = 402, + + /// + /// Equivalent to status code 403. Indicates that the server understood the client's request + /// but is refusing to fulfill it. + /// Forbidden = 403, + + /// + /// Equivalent to status code 404. Indicates that the server has not found anything + /// matching the request URI. + /// NotFound = 404, + + /// + /// Equivalent to status code 405. Indicates that the method specified in the request line + /// is not allowed for the resource identified by the request URI. + /// MethodNotAllowed = 405, + + /// + /// Equivalent to status code 406. Indicates that the server does not have the appropriate resource + /// to respond to the accept headers in the client's request. + /// NotAcceptable = 406, + + /// + /// Equivalent to status code 407. Indicates that the client must first authenticate itself with the proxy. + /// ProxyAuthenticationRequired = 407, + + /// + /// Equivalent to status code 408. Indicates that the client did not produce a request + /// within the time that the server was prepared to wait. + /// RequestTimeout = 408, + + /// + /// Equivalent to status code 409. Indicates that the client's request could not be completed + /// due to a conflict on the server. + /// Conflict = 409, + + /// + /// Equivalent to status code 410. Indicates that the requested resource is no longer available + /// at the server and no forwarding address is known. + /// Gone = 410, + + /// + /// Equivalent to status code 411. Indicates that the server refuses to accept the client's request + /// without a defined Content-Length. + /// LengthRequired = 411, + + /// + /// Equivalent to status code 412. Indicates that the precondition given in one or more of the request header fields + /// evaluated to false when it was tested on the server. + /// PreconditionFailed = 412, + + /// + /// Equivalent to status code 413. Indicates that the client's request entity is larger + /// than the server is willing or able to process. + /// RequestEntityTooLarge = 413, + + /// + /// Equivalent to status code 414. Indicates that the request URI is longer + /// than the server is willing to interpret. + /// RequestUriTooLong = 414, + + /// + /// Equivalent to status code 415. Indicates that the entity of the client's request is in a format + /// not supported by the requested resource for the requested method. + /// UnsupportedMediaType = 415, + + /// + /// Equivalent to status code 416. Indicates that none of the range specifier values in a Range request header field + /// overlap the current extent of the selected resource. + /// RequestedRangeNotSatisfiable = 416, + + /// + /// Equivalent to status code 417. Indicates that the expectation given in an Expect request header field + /// could not be met by the server. + /// ExpectationFailed = 417, + + /// + /// Equivalent to status code 500. Indicates that the server encountered an unexpected condition + /// which prevented it from fulfilling the client's request. + /// InternalServerError = 500, + + /// + /// Equivalent to status code 501. Indicates that the server does not support the functionality + /// required to fulfill the client's request. + /// NotImplemented = 501, + + /// + /// Equivalent to status code 502. Indicates that a gateway or proxy server received an invalid response + /// from the upstream server. + /// BadGateway = 502, + + /// + /// Equivalent to status code 503. Indicates that the server is currently unable to handle the client's request + /// due to a temporary overloading or maintenance of the server. + /// ServiceUnavailable = 503, + + /// + /// Equivalent to status code 504. Indicates that a gateway or proxy server did not receive a timely response + /// from the upstream server or some other auxiliary server. + /// GatewayTimeout = 504, + + /// + /// Equivalent to status code 505. Indicates that the server does not support the HTTP version + /// used in the client's request. + /// HttpVersionNotSupported = 505, } } diff --git a/websocket-sharp/Net/HttpVersion.cs b/websocket-sharp/Net/HttpVersion.cs index 570009ad..40b927f8 100644 --- a/websocket-sharp/Net/HttpVersion.cs +++ b/websocket-sharp/Net/HttpVersion.cs @@ -1,6 +1,6 @@ // // HttpVersion.cs -// Copied from System.Net.HttpVersion +// Copied from System.Net.HttpVersion.cs // // Author: // Lawrence Pit (loz@cable.a2000.nl) @@ -29,14 +29,24 @@ using System; namespace WebSocketSharp.Net { - // - // + /// + /// Provides the HTTP version numbers. + /// public class HttpVersion { + /// + /// Provides a instance for HTTP 1.0. + /// public static readonly Version Version10 = new Version (1, 0); + + /// + /// Provides a instance for HTTP 1.1. + /// public static readonly Version Version11 = new Version (1, 1); - - // pretty useless.. + + /// + /// Initializes a new instance of the class. + /// public HttpVersion () {} } } diff --git a/websocket-sharp/Server/HttpServer.cs b/websocket-sharp/Server/HttpServer.cs index 21fc16cb..e69371f4 100644 --- a/websocket-sharp/Server/HttpServer.cs +++ b/websocket-sharp/Server/HttpServer.cs @@ -36,14 +36,35 @@ using WebSocketSharp.Net; namespace WebSocketSharp.Server { + /// + /// Provides the functions of a simple HTTP server that allows to accept the WebSocket connection requests. + /// + /// + /// + /// The HttpServer class provides the multi WebSocket service. + /// + /// + /// + /// The HttpServer class needs the application configuration file to configure the server root path. + /// + /// + /// <?xml version="1.0" encoding="utf-8"?> + /// <configuration> + /// <appSettings> + /// <add key="RootPath" value="./Public" /> + /// </appSettings> + /// </configuration> + /// + /// + /// public class HttpServer { #region Fields - private Thread _acceptRequestThread; private bool _isWindows; private HttpListener _listener; private int _port; + private Thread _receiveRequestThread; private string _rootPath; private ServiceHostManager _svcHosts; @@ -51,11 +72,22 @@ namespace WebSocketSharp.Server { #region Constructors + /// + /// Initializes a new instance of the class that listens for incoming requests + /// on port 80. + /// public HttpServer() : this(80) { } + /// + /// Initializes a new instance of the class that listens for incoming requests + /// on the specified . + /// + /// + /// An that contains a port number. + /// public HttpServer(int port) { _port = port; @@ -66,16 +98,35 @@ namespace WebSocketSharp.Server { #region Properties + /// + /// Gets the port on which to listen for incoming requests. + /// + /// + /// An that contains a port number. + /// public int Port { get { return _port; } } + /// + /// Gets the collection of paths associated with the every WebSocket services that the server provides. + /// + /// + /// An IEnumerable<string> that contains the collection of paths. + /// public IEnumerable ServicePaths { get { return _svcHosts.Paths; } } + /// + /// Gets or sets a value indicating whether the server cleans up the inactive WebSocket service instances periodically. + /// + /// + /// true if the server cleans up the inactive WebSocket service instances every 60 seconds; + /// otherwise, false. The default value is true. + /// public bool Sweeped { get { return _svcHosts.Sweeped; @@ -90,43 +141,60 @@ namespace WebSocketSharp.Server { #region Events - public event EventHandler OnConnect; - public event EventHandler OnDelete; - public event EventHandler OnError; - public event EventHandler OnGet; - public event EventHandler OnHead; - public event EventHandler OnOptions; - public event EventHandler OnPatch; - public event EventHandler OnPost; - public event EventHandler OnPut; - public event EventHandler OnTrace; + /// + /// Occurs when the server gets an error. + /// + public event EventHandler OnError; + + /// + /// Occurs when the server receives an HTTP CONNECT request. + /// + public event EventHandler OnResponseToConnect; + + /// + /// Occurs when the server receives an HTTP DELETE request. + /// + public event EventHandler OnResponseToDelete; + + /// + /// Occurs when the server receives an HTTP GET request. + /// + public event EventHandler OnResponseToGet; + + /// + /// Occurs when the server receives an HTTP HEAD request. + /// + public event EventHandler OnResponseToHead; + + /// + /// Occurs when the server receives an HTTP OPTIONS request. + /// + public event EventHandler OnResponseToOptions; + + /// + /// Occurs when the server receives an HTTP PATCH request. + /// + public event EventHandler OnResponseToPatch; + + /// + /// Occurs when the server receives an HTTP POST request. + /// + public event EventHandler OnResponseToPost; + + /// + /// Occurs when the server receives an HTTP PUT request. + /// + public event EventHandler OnResponseToPut; + + /// + /// Occurs when the server receives an HTTP TRACE request. + /// + public event EventHandler OnResponseToTrace; #endregion #region Private Methods - private void acceptRequest() - { - while (true) - { - try - { - var context = _listener.GetContext(); - respondAsync(context); - } - catch (HttpListenerException) - { - // HttpListener has been closed. - break; - } - catch (Exception ex) - { - onError(ex.Message); - break; - } - } - } - private void configureFromConfigFile() { _rootPath = ConfigurationManager.AppSettings["RootPath"]; @@ -170,63 +238,85 @@ namespace WebSocketSharp.Server { OnError.Emit(this, new ErrorEventArgs(message)); } + private void receiveRequest() + { + while (true) + { + try + { + var context = _listener.GetContext(); + respondAsync(context); + } + catch (HttpListenerException) + { + // HttpListener has been closed. + break; + } + catch (Exception ex) + { + onError(ex.Message); + break; + } + } + } + private void respond(HttpListenerContext context) { var req = context.Request; var res = context.Response; var eventArgs = new ResponseEventArgs(context); - if (req.HttpMethod == "GET" && OnGet != null) + if (req.HttpMethod == "GET" && !OnResponseToGet.IsNull()) { - OnGet(this, eventArgs); + OnResponseToGet(this, eventArgs); return; } - if (req.HttpMethod == "HEAD" && OnHead != null) + if (req.HttpMethod == "HEAD" && !OnResponseToHead.IsNull()) { - OnHead(this, eventArgs); + OnResponseToHead(this, eventArgs); return; } - if (req.HttpMethod == "POST" && OnPost != null) + if (req.HttpMethod == "POST" && !OnResponseToPost.IsNull()) { - OnPost(this, eventArgs); + OnResponseToPost(this, eventArgs); return; } - if (req.HttpMethod == "PUT" && OnPut != null) + if (req.HttpMethod == "PUT" && !OnResponseToPut.IsNull()) { - OnPut(this, eventArgs); + OnResponseToPut(this, eventArgs); return; } - if (req.HttpMethod == "DELETE" && OnDelete != null) + if (req.HttpMethod == "DELETE" && !OnResponseToDelete.IsNull()) { - OnDelete(this, eventArgs); + OnResponseToDelete(this, eventArgs); return; } - if (req.HttpMethod == "OPTIONS" && OnOptions != null) + if (req.HttpMethod == "OPTIONS" && !OnResponseToOptions.IsNull()) { - OnOptions(this, eventArgs); + OnResponseToOptions(this, eventArgs); return; } - if (req.HttpMethod == "TRACE" && OnTrace != null) + if (req.HttpMethod == "TRACE" && !OnResponseToTrace.IsNull()) { - OnTrace(this, eventArgs); + OnResponseToTrace(this, eventArgs); return; } - if (req.HttpMethod == "CONNECT" && OnConnect != null) + if (req.HttpMethod == "CONNECT" && !OnResponseToConnect.IsNull()) { - OnConnect(this, eventArgs); + OnResponseToConnect(this, eventArgs); return; } - if (req.HttpMethod == "PATCH" && OnPatch != null) + if (req.HttpMethod == "PATCH" && !OnResponseToPatch.IsNull()) { - OnPatch(this, eventArgs); + OnResponseToPatch(this, eventArgs); return; } @@ -235,7 +325,7 @@ namespace WebSocketSharp.Server { private void respondAsync(HttpListenerContext context) { - WaitCallback respondCb = (state) => + WaitCallback callback = (state) => { var req = context.Request; var res = context.Response; @@ -260,14 +350,14 @@ namespace WebSocketSharp.Server { } }; - ThreadPool.QueueUserWorkItem(respondCb); + ThreadPool.QueueUserWorkItem(callback); } - private void startAcceptRequestThread() + private void startReceiveRequestThread() { - _acceptRequestThread = new Thread(new ThreadStart(acceptRequest)); - _acceptRequestThread.IsBackground = true; - _acceptRequestThread.Start(); + _receiveRequestThread = new Thread(new ThreadStart(receiveRequest)); + _receiveRequestThread.IsBackground = true; + _receiveRequestThread.Start(); } private bool upgradeToWebSocket(HttpListenerContext context) @@ -292,7 +382,16 @@ namespace WebSocketSharp.Server { #region Public Methods - public void AddService(string absPath) + /// + /// Adds the specified type WebSocket service. + /// + /// + /// A that contains an absolute path associated with the WebSocket service. + /// + /// + /// The type of the WebSocket service. The T must inherit the class. + /// + public void AddWebSocketService(string absPath) where T : WebSocketService, new() { string msg; @@ -310,28 +409,42 @@ namespace WebSocketSharp.Server { _svcHosts.Add(absPath, svcHost); } + /// + /// Gets the contents of the specified file. + /// + /// + /// An array of that contains the contents of the file. + /// + /// + /// A that contains a virtual path to the file to get. + /// public byte[] GetFile(string path) { var filePath = _rootPath + path; if (_isWindows) filePath = filePath.Replace("/", "\\"); - if (File.Exists(filePath)) - return File.ReadAllBytes(filePath); - - return null; + return File.Exists(filePath) + ? File.ReadAllBytes(filePath) + : null; } + /// + /// Starts to receive incoming requests. + /// public void Start() { _listener.Start(); - startAcceptRequestThread(); + startReceiveRequestThread(); } + /// + /// Stops receiving incoming requests. + /// public void Stop() { _listener.Close(); - _acceptRequestThread.Join(5 * 1000); + _receiveRequestThread.Join(5 * 1000); _svcHosts.Stop(); } diff --git a/websocket-sharp/Server/ResponseEventArgs.cs b/websocket-sharp/Server/ResponseEventArgs.cs index 457b3fe6..dac81456 100644 --- a/websocket-sharp/Server/ResponseEventArgs.cs +++ b/websocket-sharp/Server/ResponseEventArgs.cs @@ -4,7 +4,7 @@ * * The MIT License * - * Copyright (c) 2012 sta.blockhead + * 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 "Software"), to deal @@ -31,15 +31,44 @@ using WebSocketSharp.Net; namespace WebSocketSharp.Server { + /// + /// Contains the event data associated with the response events of the class. + /// + /// + /// A response event occurs when a instance receives an HTTP request. + /// If you want to get the HTTP request objects, you should access the property. + /// If you want to get the HTTP response objects to send, you should access the property. + /// public class ResponseEventArgs : EventArgs { - public HttpListenerRequest Request { get; private set; } - public HttpListenerResponse Response { get; private set; } + #region Constructor - public ResponseEventArgs(HttpListenerContext context) + internal ResponseEventArgs(HttpListenerContext context) { Request = context.Request; Response = context.Response; } + + #endregion + + #region Properties + + /// + /// Gets the HTTP request objects sent from a client. + /// + /// + /// A that contains the HTTP request objects. + /// + public HttpListenerRequest Request { get; private set; } + + /// + /// Gets the HTTP response objects to send to the client in response to the client's request. + /// + /// + /// A that contains the HTTP response objects. + /// + public HttpListenerResponse Response { get; private set; } + + #endregion } } diff --git a/websocket-sharp/Server/WebSocketServer.cs b/websocket-sharp/Server/WebSocketServer.cs index 407910f7..f4fbd60d 100644 --- a/websocket-sharp/Server/WebSocketServer.cs +++ b/websocket-sharp/Server/WebSocketServer.cs @@ -165,6 +165,7 @@ namespace WebSocketSharp.Server { /// /// /// true if the server cleans up the inactive clients every 60 seconds; otherwise, false. + /// The default value is true. /// public bool Sweeped { get { @@ -218,7 +219,7 @@ namespace WebSocketSharp.Server { #region Public Methods /// - /// Adds a WebSocket service. + /// Adds the specified type WebSocket service. /// /// /// A that contains an absolute path associated with the WebSocket service. @@ -226,7 +227,7 @@ namespace WebSocketSharp.Server { /// /// The type of the WebSocket service. The T must inherit the class. /// - public void AddService(string absPath) + public void AddWebSocketService(string absPath) where T : WebSocketService, new() { string msg; diff --git a/websocket-sharp/Server/WebSocketServerBase.cs b/websocket-sharp/Server/WebSocketServerBase.cs index 1f8febab..c1a654a3 100644 --- a/websocket-sharp/Server/WebSocketServerBase.cs +++ b/websocket-sharp/Server/WebSocketServerBase.cs @@ -229,7 +229,7 @@ namespace WebSocketSharp.Server { #region Event /// - /// Occurs when this server gets an error. + /// Occurs when the server gets an error. /// public event EventHandler OnError; diff --git a/websocket-sharp/Server/WebSocketServiceHost.cs b/websocket-sharp/Server/WebSocketServiceHost.cs index f5837367..411d527e 100644 --- a/websocket-sharp/Server/WebSocketServiceHost.cs +++ b/websocket-sharp/Server/WebSocketServiceHost.cs @@ -187,6 +187,7 @@ namespace WebSocketSharp.Server { /// /// /// true if the server cleans up the inactive clients every 60 seconds; otherwise, false. + /// The default value is true. /// public bool Sweeped { get { diff --git a/websocket-sharp/bin/Debug/websocket-sharp.dll b/websocket-sharp/bin/Debug/websocket-sharp.dll index 4f518365..83633d5d 100755 Binary files a/websocket-sharp/bin/Debug/websocket-sharp.dll and b/websocket-sharp/bin/Debug/websocket-sharp.dll differ diff --git a/websocket-sharp/bin/Debug/websocket-sharp.dll.mdb b/websocket-sharp/bin/Debug/websocket-sharp.dll.mdb index 2aad9676..3497ca5c 100644 Binary files a/websocket-sharp/bin/Debug/websocket-sharp.dll.mdb and b/websocket-sharp/bin/Debug/websocket-sharp.dll.mdb differ diff --git a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll index c0b1212e..58f0052b 100755 Binary files a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll and b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index 2a1a234f..77047401 100644 Binary files a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/websocket-sharp/bin/Release/websocket-sharp.dll b/websocket-sharp/bin/Release/websocket-sharp.dll index 82be0547..b0dae019 100755 Binary files a/websocket-sharp/bin/Release/websocket-sharp.dll and b/websocket-sharp/bin/Release/websocket-sharp.dll differ diff --git a/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll b/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll index 32c7c8b9..25a32dc9 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 23d49497..0630c4d6 100644 --- a/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.xml +++ b/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.xml @@ -139,13 +139,13 @@ - Gets the description of the HTTP status code using the specified code. + Gets the description of the HTTP status code using the specified . - A that contains the description of the . + A that contains the description of the HTTP status code. - One of values that contains the HTTP status code. + One of values that contains an HTTP status code. @@ -178,13 +178,13 @@ - Gets the description of the HTTP status code using the specified code. + Gets the description of the HTTP status code using the specified . - A that contains the description of the . + A that contains the description of the HTTP status code. - An that contains the HTTP status code. + An that contains an HTTP status code. @@ -1096,6 +1096,7 @@ true if the server cleans up the inactive clients every 60 seconds; otherwise, false. + The default value is true. @@ -1106,9 +1107,9 @@ A that contains the WebSocket connection request objects. - + - Adds a WebSocket service. + Adds the specified type WebSocket service. A that contains an absolute path associated with the WebSocket service. @@ -1391,6 +1392,524 @@ The string to encode. The TextWriter output stream containing the encoded string. + + + Provides the functions of a simple HTTP server that allows to accept the WebSocket connection requests. + + + + The HttpServer class provides the multi WebSocket service. + + + + The HttpServer class needs the application configuration file to configure the server root path. + + + <?xml version="1.0" encoding="utf-8"?> + <configuration> + <appSettings> + <add key="RootPath" value="./Public" /> + </appSettings> + </configuration> + + + + + + + Initializes a new instance of the class that listens for incoming requests + on port 80. + + + + + Initializes a new instance of the class that listens for incoming requests + on the specified . + + + An that contains a port number. + + + + + Occurs when the server gets an error. + + + + + Occurs when the server receives an HTTP CONNECT request. + + + + + Occurs when the server receives an HTTP DELETE request. + + + + + Occurs when the server receives an HTTP GET request. + + + + + Occurs when the server receives an HTTP HEAD request. + + + + + Occurs when the server receives an HTTP OPTIONS request. + + + + + Occurs when the server receives an HTTP PATCH request. + + + + + Occurs when the server receives an HTTP POST request. + + + + + Occurs when the server receives an HTTP PUT request. + + + + + Occurs when the server receives an HTTP TRACE request. + + + + + Gets the port on which to listen for incoming requests. + + + An that contains a port number. + + + + + Gets the collection of paths associated with the every WebSocket services that the server provides. + + + An IEnumerable<string> that contains the collection of paths. + + + + + Gets or sets a value indicating whether the server cleans up the inactive WebSocket service instances periodically. + + + true if the server cleans up the inactive WebSocket service instances every 60 seconds; + otherwise, false. The default value is true. + + + + + Adds the specified type WebSocket service. + + + A that contains an absolute path associated with the WebSocket service. + + + The type of the WebSocket service. The T must inherit the class. + + + + + Gets the contents of the specified file. + + + An array of that contains the contents of the file. + + + A that contains a virtual path to the file to get. + + + + + Starts to receive incoming requests. + + + + + Stops receiving incoming requests. + + + + + Contains the event data associated with the response events of the class. + + + A response event occurs when a instance receives an HTTP request. + If you want to get the HTTP request objects, you should access the property. + If you want to get the HTTP response objects to send, you should access the property. + + + + + Gets the HTTP request objects sent from a client. + + + A that contains the HTTP request objects. + + + + + Gets the HTTP response objects to send to the client in response to the client's request. + + + A that contains the HTTP response objects. + + + + + Provides the HTTP version numbers. + + + + + Initializes a new instance of the class. + + + + + Provides a instance for HTTP 1.0. + + + + + Provides a instance for HTTP 1.1. + + + + + Contains the values of the HTTP status codes. + + + The HttpStatusCode enumeration contains the values of the HTTP status codes defined in + RFC 2616 for HTTP 1.1. + + + + + Equivalent to status code 100. Indicates that the client should continue with its request. + + + + + Equivalent to status code 101. Indicates that the server is switching the HTTP version or protocol on the connection. + + + + + Equivalent to status code 200. Indicates that the client's request has succeeded. + + + + + Equivalent to status code 201. Indicates that the client's request has been fulfilled + and resulted in a new resource being created. + + + + + Equivalent to status code 202. Indicates that the client's request has been accepted for processing, + but the processing has not been completed. + + + + + Equivalent to status code 203. Indicates that the returned metainformation is from a local or a third-party copy instead of the origin server. + + + + + Equivalent to status code 204. Indicates that the server has fulfilled the client's request + but does not need to return an entity-body. + + + + + Equivalent to status code 205. Indicates that the server has fulfilled the client's request + and the user agent should reset the document view which caused the request to be sent. + + + + + Equivalent to status code 206. Indicates that the server has fulfilled the partial GET request for the resource. + + + + + + Equivalent to status code 300. Indicates that the requested resource corresponds to + any one of multiple representations. + + + MultipleChoices is a synonym for Ambiguous. + + + + + + + Equivalent to status code 300. Indicates that the requested resource corresponds to + any one of multiple representations. + + + Ambiguous is a synonym for MultipleChoices. + + + + + + + Equivalent to status code 301. Indicates that the requested resource has been assigned a new permanent URI + and any future references to this resource should use one of the returned URIs. + + + MovedPermanently is a synonym for Moved. + + + + + + + Equivalent to status code 301. Indicates that the requested resource has been assigned a new permanent URI + and any future references to this resource should use one of the returned URIs. + + + Moved is a synonym for MovedPermanently. + + + + + + + Equivalent to status code 302. Indicates that the requested resource is located temporarily + under a different URI. + + + Found is a synonym for Redirect. + + + + + + + Equivalent to status code 302. Indicates that the requested resource is located temporarily + under a different URI. + + + Redirect is a synonym for Found. + + + + + + + Equivalent to status code 303. Indicates that the response to the request can be found + under a different URI and should be retrieved using a GET method on that resource. + + + SeeOther is a synonym for RedirectMethod. + + + + + + + Equivalent to status code 303. Indicates that the response to the request can be found + under a different URI and should be retrieved using a GET method on that resource. + + + RedirectMethod is a synonym for SeeOther. + + + + + + Equivalent to status code 304. Indicates that the client has performed a conditional GET request + and access is allowed, but the document has not been modified. + + + + + Equivalent to status code 305. Indicates that the requested resource must be accessed + through the proxy given by the Location field. + + + + + Equivalent to status code 306. This code was used in a previous version of the specification, + is no longer used, and is reserved for future use. + + + + + + Equivalent to status code 307. Indicates that the requested resource is located temporarily + under a different URI. + + + TemporaryRedirect is a synonym for RedirectKeepVerb. + + + + + + + Equivalent to status code 307. Indicates that the requested resource is located temporarily + under a different URI. + + + RedirectKeepVerb is a synonym for TemporaryRedirect. + + + + + + Equivalent to status code 400. Indicates that the client's request could not be understood + by the server due to malformed syntax. + + + + + Equivalent to status code 401. Indicates that the client's request requires user authentication. + + + + + Equivalent to status code 402. This code is reserved for future use. + + + + + Equivalent to status code 403. Indicates that the server understood the client's request + but is refusing to fulfill it. + + + + + Equivalent to status code 404. Indicates that the server has not found anything + matching the request URI. + + + + + Equivalent to status code 405. Indicates that the method specified in the request line + is not allowed for the resource identified by the request URI. + + + + + Equivalent to status code 406. Indicates that the server does not have the appropriate resource + to respond to the accept headers in the client's request. + + + + + Equivalent to status code 407. Indicates that the client must first authenticate itself with the proxy. + + + + + Equivalent to status code 408. Indicates that the client did not produce a request + within the time that the server was prepared to wait. + + + + + Equivalent to status code 409. Indicates that the client's request could not be completed + due to a conflict on the server. + + + + + Equivalent to status code 410. Indicates that the requested resource is no longer available + at the server and no forwarding address is known. + + + + + Equivalent to status code 411. Indicates that the server refuses to accept the client's request + without a defined Content-Length. + + + + + Equivalent to status code 412. Indicates that the precondition given in one or more of the request header fields + evaluated to false when it was tested on the server. + + + + + Equivalent to status code 413. Indicates that the client's request entity is larger + than the server is willing or able to process. + + + + + Equivalent to status code 414. Indicates that the request URI is longer + than the server is willing to interpret. + + + + + Equivalent to status code 415. Indicates that the entity of the client's request is in a format + not supported by the requested resource for the requested method. + + + + + Equivalent to status code 416. Indicates that none of the range specifier values in a Range request header field + overlap the current extent of the selected resource. + + + + + Equivalent to status code 417. Indicates that the expectation given in an Expect request header field + could not be met by the server. + + + + + Equivalent to status code 500. Indicates that the server encountered an unexpected condition + which prevented it from fulfilling the client's request. + + + + + Equivalent to status code 501. Indicates that the server does not support the functionality + required to fulfill the client's request. + + + + + Equivalent to status code 502. Indicates that a gateway or proxy server received an invalid response + from the upstream server. + + + + + Equivalent to status code 503. Indicates that the server is currently unable to handle the client's request + due to a temporary overloading or maintenance of the server. + + + + + Equivalent to status code 504. Indicates that a gateway or proxy server did not receive a timely response + from the upstream server or some other auxiliary server. + + + + + Equivalent to status code 505. Indicates that the server does not support the HTTP version + used in the client's request. + + Provides the basic functions of the server that receives the WebSocket connection requests. @@ -1453,7 +1972,7 @@ - Occurs when this server gets an error. + Occurs when the server gets an error. @@ -1670,6 +2189,7 @@ true if the server cleans up the inactive clients every 60 seconds; otherwise, false. + The default value is true. diff --git a/websocket-sharp/doc/html/WebSocketSharp.Net/HttpStatusCode.html b/websocket-sharp/doc/html/WebSocketSharp.Net/HttpStatusCode.html index b6584315..751a6994 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Net/HttpStatusCode.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Net/HttpStatusCode.html @@ -207,8 +207,8 @@

HttpStatusCode Enum

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

+ Contains the values of the HTTP status codes. +

Syntax

public enum HttpStatusCode
@@ -216,8 +216,9 @@

Remarks

- Documentation for this section has not yet been entered. -
+ The HttpStatusCode enumeration contains the values of the HTTP status codes defined in + RFC 2616 for HTTP 1.1. +

Members

@@ -230,7 +231,8 @@ Accepted @@ -238,7 +240,13 @@ Ambiguous @@ -246,7 +254,8 @@ BadGateway @@ -254,7 +263,8 @@ BadRequest @@ -262,7 +272,8 @@ Conflict @@ -270,7 +281,7 @@ Continue @@ -278,7 +289,8 @@ Created @@ -286,7 +298,8 @@ ExpectationFailed @@ -294,7 +307,8 @@ Forbidden @@ -302,7 +316,13 @@ Found @@ -310,7 +330,8 @@ GatewayTimeout @@ -318,7 +339,8 @@ Gone @@ -326,7 +348,8 @@ HttpVersionNotSupported @@ -334,7 +357,8 @@ InternalServerError @@ -342,7 +366,8 @@ LengthRequired @@ -350,7 +375,8 @@ MethodNotAllowed @@ -358,7 +384,13 @@ Moved @@ -366,7 +398,13 @@ MovedPermanently @@ -374,7 +412,13 @@ MultipleChoices @@ -382,7 +426,8 @@ NoContent @@ -390,7 +435,7 @@ NonAuthoritativeInformation @@ -398,7 +443,8 @@ NotAcceptable @@ -406,7 +452,8 @@ NotFound @@ -414,7 +461,8 @@ NotImplemented @@ -422,7 +470,8 @@ NotModified @@ -430,7 +479,7 @@ OK @@ -438,7 +487,7 @@ PartialContent @@ -446,7 +495,7 @@ PaymentRequired @@ -454,7 +503,8 @@ PreconditionFailed @@ -462,7 +512,7 @@ ProxyAuthenticationRequired @@ -470,7 +520,13 @@ Redirect @@ -478,7 +534,13 @@ RedirectKeepVerb @@ -486,7 +548,13 @@ RedirectMethod @@ -494,7 +562,8 @@ RequestedRangeNotSatisfiable @@ -502,7 +571,8 @@ RequestEntityTooLarge @@ -510,7 +580,8 @@ RequestTimeout @@ -518,7 +589,8 @@ RequestUriTooLong @@ -526,7 +598,8 @@ ResetContent @@ -534,7 +607,13 @@ SeeOther @@ -542,7 +621,8 @@ ServiceUnavailable @@ -550,7 +630,7 @@ SwitchingProtocols @@ -558,7 +638,13 @@ TemporaryRedirect @@ -566,7 +652,7 @@ Unauthorized @@ -574,7 +660,8 @@ UnsupportedMediaType @@ -582,7 +669,8 @@ Unused @@ -590,7 +678,8 @@ UseProxy
- Documentation for this section has not yet been entered. + Equivalent to status code 202. Indicates that the client's request has been accepted for processing, + but the processing has not been completed.
- Documentation for this section has not yet been entered. +

+ Equivalent to status code 300. Indicates that the requested resource corresponds to + any one of multiple representations. +

+

+ Ambiguous is a synonym for MultipleChoices. +

- Documentation for this section has not yet been entered. + Equivalent to status code 502. Indicates that a gateway or proxy server received an invalid response + from the upstream server.
- Documentation for this section has not yet been entered. + Equivalent to status code 400. Indicates that the client's request could not be understood + by the server due to malformed syntax.
- Documentation for this section has not yet been entered. + Equivalent to status code 409. Indicates that the client's request could not be completed + due to a conflict on the server.
- Documentation for this section has not yet been entered. + Equivalent to status code 100. Indicates that the client should continue with its request.
- Documentation for this section has not yet been entered. + Equivalent to status code 201. Indicates that the client's request has been fulfilled + and resulted in a new resource being created.
- Documentation for this section has not yet been entered. + Equivalent to status code 417. Indicates that the expectation given in an Expect request header field + could not be met by the server.
- Documentation for this section has not yet been entered. + Equivalent to status code 403. Indicates that the server understood the client's request + but is refusing to fulfill it.
- Documentation for this section has not yet been entered. +

+ Equivalent to status code 302. Indicates that the requested resource is located temporarily + under a different URI. +

+

+ Found is a synonym for Redirect. +

- Documentation for this section has not yet been entered. + Equivalent to status code 504. Indicates that a gateway or proxy server did not receive a timely response + from the upstream server or some other auxiliary server.
- Documentation for this section has not yet been entered. + Equivalent to status code 410. Indicates that the requested resource is no longer available + at the server and no forwarding address is known.
- Documentation for this section has not yet been entered. + Equivalent to status code 505. Indicates that the server does not support the HTTP version + used in the client's request.
- Documentation for this section has not yet been entered. + Equivalent to status code 500. Indicates that the server encountered an unexpected condition + which prevented it from fulfilling the client's request.
- Documentation for this section has not yet been entered. + Equivalent to status code 411. Indicates that the server refuses to accept the client's request + without a defined Content-Length.
- Documentation for this section has not yet been entered. + Equivalent to status code 405. Indicates that the method specified in the request line + is not allowed for the resource identified by the request URI.
- Documentation for this section has not yet been entered. +

+ Equivalent to status code 301. Indicates that the requested resource has been assigned a new permanent URI + and any future references to this resource should use one of the returned URIs. +

+

+ Moved is a synonym for MovedPermanently. +

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

+ Equivalent to status code 301. Indicates that the requested resource has been assigned a new permanent URI + and any future references to this resource should use one of the returned URIs. +

+

+ MovedPermanently is a synonym for Moved. +

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

+ Equivalent to status code 300. Indicates that the requested resource corresponds to + any one of multiple representations. +

+

+ MultipleChoices is a synonym for Ambiguous. +

- Documentation for this section has not yet been entered. + Equivalent to status code 204. Indicates that the server has fulfilled the client's request + but does not need to return an entity-body.
- Documentation for this section has not yet been entered. + Equivalent to status code 203. Indicates that the returned metainformation is from a local or a third-party copy instead of the origin server.
- Documentation for this section has not yet been entered. + Equivalent to status code 406. Indicates that the server does not have the appropriate resource + to respond to the accept headers in the client's request.
- Documentation for this section has not yet been entered. + Equivalent to status code 404. Indicates that the server has not found anything + matching the request URI.
- Documentation for this section has not yet been entered. + Equivalent to status code 501. Indicates that the server does not support the functionality + required to fulfill the client's request.
- Documentation for this section has not yet been entered. + Equivalent to status code 304. Indicates that the client has performed a conditional GET request + and access is allowed, but the document has not been modified.
- Documentation for this section has not yet been entered. + Equivalent to status code 200. Indicates that the client's request has succeeded.
- Documentation for this section has not yet been entered. + Equivalent to status code 206. Indicates that the server has fulfilled the partial GET request for the resource.
- Documentation for this section has not yet been entered. + Equivalent to status code 402. This code is reserved for future use.
- Documentation for this section has not yet been entered. + Equivalent to status code 412. Indicates that the precondition given in one or more of the request header fields + evaluated to false when it was tested on the server.
- Documentation for this section has not yet been entered. + Equivalent to status code 407. Indicates that the client must first authenticate itself with the proxy.
- Documentation for this section has not yet been entered. +

+ Equivalent to status code 302. Indicates that the requested resource is located temporarily + under a different URI. +

+

+ Redirect is a synonym for Found. +

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

+ Equivalent to status code 307. Indicates that the requested resource is located temporarily + under a different URI. +

+

+ RedirectKeepVerb is a synonym for TemporaryRedirect. +

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

+ Equivalent to status code 303. Indicates that the response to the request can be found + under a different URI and should be retrieved using a GET method on that resource. +

+

+ RedirectMethod is a synonym for SeeOther. +

- Documentation for this section has not yet been entered. + Equivalent to status code 416. Indicates that none of the range specifier values in a Range request header field + overlap the current extent of the selected resource.
- Documentation for this section has not yet been entered. + Equivalent to status code 413. Indicates that the client's request entity is larger + than the server is willing or able to process.
- Documentation for this section has not yet been entered. + Equivalent to status code 408. Indicates that the client did not produce a request + within the time that the server was prepared to wait.
- Documentation for this section has not yet been entered. + Equivalent to status code 414. Indicates that the request URI is longer + than the server is willing to interpret.
- Documentation for this section has not yet been entered. + Equivalent to status code 205. Indicates that the server has fulfilled the client's request + and the user agent should reset the document view which caused the request to be sent.
- Documentation for this section has not yet been entered. +

+ Equivalent to status code 303. Indicates that the response to the request can be found + under a different URI and should be retrieved using a GET method on that resource. +

+

+ SeeOther is a synonym for RedirectMethod. +

- Documentation for this section has not yet been entered. + Equivalent to status code 503. Indicates that the server is currently unable to handle the client's request + due to a temporary overloading or maintenance of the server.
- Documentation for this section has not yet been entered. + Equivalent to status code 101. Indicates that the server is switching the HTTP version or protocol on the connection.
- Documentation for this section has not yet been entered. +

+ Equivalent to status code 307. Indicates that the requested resource is located temporarily + under a different URI. +

+

+ TemporaryRedirect is a synonym for RedirectKeepVerb. +

- Documentation for this section has not yet been entered. + Equivalent to status code 401. Indicates that the client's request requires user authentication.
- Documentation for this section has not yet been entered. + Equivalent to status code 415. Indicates that the entity of the client's request is in a format + not supported by the requested resource for the requested method.
- Documentation for this section has not yet been entered. + Equivalent to status code 306. This code was used in a previous version of the specification, + is no longer used, and is reserved for future use.
- Documentation for this section has not yet been entered. + Equivalent to status code 305. Indicates that the requested resource must be accessed + through the proxy given by the Location field.
diff --git a/websocket-sharp/doc/html/WebSocketSharp.Net/HttpVersion.html b/websocket-sharp/doc/html/WebSocketSharp.Net/HttpVersion.html index 1bc2a1f8..6ee072fe 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Net/HttpVersion.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Net/HttpVersion.html @@ -207,8 +207,8 @@

HttpVersion Class

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

+ Provides the HTTP version numbers. +

Syntax

public class HttpVersion
@@ -243,8 +243,8 @@ ()
- Documentation for this section has not yet been entered. - + Initializes a new instance of the WebSocketSharp.Net.HttpVersion class. +
@@ -265,7 +265,9 @@ Version - . Documentation for this section has not yet been entered. + . + Provides a Version instance for HTTP 1.0. + @@ -279,7 +281,9 @@ Version - . Documentation for this section has not yet been entered. + . + Provides a Version instance for HTTP 1.1. + @@ -322,8 +326,8 @@

HttpVersion Constructor

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

+ Initializes a new instance of the WebSocketSharp.Net.HttpVersion class. +

Syntax

public HttpVersion ()

Remarks

@@ -338,8 +342,8 @@

Version10 Field

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

+ Provides a Version instance for HTTP 1.0. +

Syntax

public static readonly Version Version10

Remarks

@@ -354,8 +358,8 @@

Version11 Field

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

+ Provides a Version instance for HTTP 1.1. +

Syntax

public static readonly Version Version11

Remarks

diff --git a/websocket-sharp/doc/html/WebSocketSharp.Net/index.html b/websocket-sharp/doc/html/WebSocketSharp.Net/index.html index a8de8d25..77a44458 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Net/index.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Net/index.html @@ -295,16 +295,16 @@ HttpStatusCode - Documentation for this section has not yet been entered. - + Contains the values of the HTTP status codes. + HttpVersion - Documentation for this section has not yet been entered. - + Provides the HTTP version numbers. + diff --git a/websocket-sharp/doc/html/WebSocketSharp.Server/HttpServer.html b/websocket-sharp/doc/html/WebSocketSharp.Server/HttpServer.html index 1298496c..9b9816ae 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Server/HttpServer.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Server/HttpServer.html @@ -207,8 +207,8 @@

HttpServer Class

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

+ Provides the functions of a simple HTTP server that allows to accept the WebSocket connection requests. +

Syntax

public class HttpServer
@@ -216,7 +216,35 @@

Remarks

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

+ The HttpServer class provides the multi WebSocket service. +

+

+

+ The HttpServer class needs the application configuration file to configure the server root path. +

+ + + + + + + +
+ + xml Example + +
+
+            <?xml version="1.0" encoding="utf-8"?>
+            <configuration>
+            <appSettings>
+            <add key="RootPath" value="./Public" />
+            </appSettings>
+            </configuration>
+            
+
+

Requirements

@@ -243,8 +271,9 @@ ()
- Documentation for this section has not yet been entered. - + Initializes a new instance of the WebSocketSharp.Server.HttpServer class that listens for incoming requests + on port 80. + @@ -258,8 +287,9 @@ (int)
- Documentation for this section has not yet been entered. - + Initializes a new instance of the WebSocketSharp.Server.HttpServer class that listens for incoming requests + on the specified port. +
@@ -278,7 +308,9 @@ int - . Documentation for this section has not yet been entered. + . + Gets the port on which to listen for incoming requests. + [read-only]
@@ -290,7 +322,9 @@ IEnumerable<string> - . Documentation for this section has not yet been entered. + . + Gets the collection of paths associated with the every WebSocket services that the server provides. + @@ -305,7 +339,9 @@ bool - . Documentation for this section has not yet been entered. + . + Gets or sets a value indicating whether the server cleans up the inactive WebSocket service instances periodically. + @@ -321,8 +357,10 @@ - AddService<T> - (string)
Documentation for this section has not yet been entered.
+ AddWebSocketService<T> + (string)
+ Adds the specified type WebSocket service. +
@@ -332,7 +370,9 @@ GetFile - (string) : byte[]
Documentation for this section has not yet been entered.
+ (string) : byte[]
+ Gets the contents of the specified file. +
@@ -342,7 +382,9 @@ Start - ()
Documentation for this section has not yet been entered.
+ ()
+ Starts to receive incoming requests. +
@@ -352,7 +394,9 @@ Stop - ()
Documentation for this section has not yet been entered.
+ ()
+ Stops receiving incoming requests. +
@@ -368,12 +412,12 @@ - OnConnect + OnError - Documentation for this section has not yet been entered. - + Occurs when the server gets an error. + @@ -382,12 +426,12 @@ - OnDelete + OnResponseToConnect - Documentation for this section has not yet been entered. - + Occurs when the server receives an HTTP CONNECT request. + @@ -396,12 +440,12 @@ - OnError + OnResponseToDelete - Documentation for this section has not yet been entered. - + Occurs when the server receives an HTTP DELETE request. + @@ -410,12 +454,12 @@ - OnGet + OnResponseToGet - Documentation for this section has not yet been entered. - + Occurs when the server receives an HTTP GET request. + @@ -424,12 +468,12 @@ - OnHead + OnResponseToHead - Documentation for this section has not yet been entered. - + Occurs when the server receives an HTTP HEAD request. + @@ -438,12 +482,12 @@ - OnOptions + OnResponseToOptions - Documentation for this section has not yet been entered. - + Occurs when the server receives an HTTP OPTIONS request. + @@ -452,12 +496,12 @@ - OnPatch + OnResponseToPatch - Documentation for this section has not yet been entered. - + Occurs when the server receives an HTTP PATCH request. + @@ -466,12 +510,12 @@ - OnPost + OnResponseToPost - Documentation for this section has not yet been entered. - + Occurs when the server receives an HTTP POST request. + @@ -480,12 +524,12 @@ - OnPut + OnResponseToPut - Documentation for this section has not yet been entered. - + Occurs when the server receives an HTTP PUT request. + @@ -494,12 +538,12 @@ - OnTrace + OnResponseToTrace - Documentation for this section has not yet been entered. - + Occurs when the server receives an HTTP TRACE request. + @@ -542,8 +586,9 @@

HttpServer Constructor

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

+ Initializes a new instance of the WebSocketSharp.Server.HttpServer class that listens for incoming requests + on port 80. +

Syntax

public HttpServer ()

Remarks

@@ -558,8 +603,9 @@

HttpServer Constructor

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

+ Initializes a new instance of the WebSocketSharp.Server.HttpServer class that listens for incoming requests + on the specified port. +

Syntax

public HttpServer (int port)

Parameters

@@ -569,8 +615,8 @@ port
- Documentation for this section has not yet been entered. -
+ An int that contains a port number. +

Remarks

@@ -582,49 +628,49 @@ Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)
-

AddService<T> Generic Method

-
+

AddWebSocketService<T> Generic Method

+

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

+ Adds the specified type WebSocket service. +

Syntax

-
public void AddService<T> (string absPath)
where T : WebSocketSharp.Server.WebSocketService, new()
+
public void AddWebSocketService<T> (string absPath)
where T : WebSocketSharp.Server.WebSocketService, new()

Type Parameters

-
+
T
- Documentation for this section has not yet been entered. -
+ The type of the WebSocket service. The T must inherit the WebSocketSharp.Server.WebSocketService class. +

Parameters

-
+
absPath
- Documentation for this section has not yet been entered. -
+ A string that contains an absolute path associated with the WebSocket service. +

Remarks

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

Requirements

-
+
Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

GetFile Method

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

+ Gets the contents of the specified file. +

Syntax

public byte[] GetFile (string path)

Parameters

@@ -634,14 +680,14 @@ path
- Documentation for this section has not yet been entered. -
+ A string that contains a virtual path to the file to get. +

Returns

- Documentation for this section has not yet been entered. -
+ An array of byte that contains the contents of the file. +

Remarks

Documentation for this section has not yet been entered. @@ -651,177 +697,177 @@ Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

-

OnConnect Event

-
+

OnError Event

+

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

+ Occurs when the server gets an error. +

Syntax

-
public event EventHandler<ResponseEventArgs> OnConnect
+

Remarks

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

Requirements

-
+
Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

-

OnDelete Event

-
+

OnResponseToConnect Event

+

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

+ Occurs when the server receives an HTTP CONNECT request. +

Syntax

-
public event EventHandler<ResponseEventArgs> OnDelete
+
public event EventHandler<ResponseEventArgs> OnResponseToConnect

Remarks

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

Requirements

-
+
Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

-

OnError Event

-
+

OnResponseToDelete Event

+

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

+ Occurs when the server receives an HTTP DELETE request. +

Syntax

- +
public event EventHandler<ResponseEventArgs> OnResponseToDelete

Remarks

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

Requirements

-
+
Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

-

OnGet Event

-
+

OnResponseToGet Event

+

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

+ Occurs when the server receives an HTTP GET request. +

Syntax

- +
public event EventHandler<ResponseEventArgs> OnResponseToGet

Remarks

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

Requirements

-
+
Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

-

OnHead Event

-
+

OnResponseToHead Event

+

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

+ Occurs when the server receives an HTTP HEAD request. +

Syntax

-
public event EventHandler<ResponseEventArgs> OnHead
+
public event EventHandler<ResponseEventArgs> OnResponseToHead

Remarks

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

Requirements

-
+
Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

-

OnOptions Event

-
+

OnResponseToOptions Event

+

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

+ Occurs when the server receives an HTTP OPTIONS request. +

Syntax

-
public event EventHandler<ResponseEventArgs> OnOptions
+
public event EventHandler<ResponseEventArgs> OnResponseToOptions

Remarks

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

Requirements

-
+
Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

-

OnPatch Event

-
+

OnResponseToPatch Event

+

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

+ Occurs when the server receives an HTTP PATCH request. +

Syntax

-
public event EventHandler<ResponseEventArgs> OnPatch
+
public event EventHandler<ResponseEventArgs> OnResponseToPatch

Remarks

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

Requirements

-
+
Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

-

OnPost Event

-
+

OnResponseToPost Event

+

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

+ Occurs when the server receives an HTTP POST request. +

Syntax

-
public event EventHandler<ResponseEventArgs> OnPost
+
public event EventHandler<ResponseEventArgs> OnResponseToPost

Remarks

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

Requirements

-
+
Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

-

OnPut Event

-
+

OnResponseToPut Event

+

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

+ Occurs when the server receives an HTTP PUT request. +

Syntax

- +
public event EventHandler<ResponseEventArgs> OnResponseToPut

Remarks

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

Requirements

-
+
Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

-

OnTrace Event

-
+

OnResponseToTrace Event

+

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

+ Occurs when the server receives an HTTP TRACE request. +

Syntax

-
public event EventHandler<ResponseEventArgs> OnTrace
+
public event EventHandler<ResponseEventArgs> OnResponseToTrace

Remarks

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

Requirements

-
+
Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

Port Property

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

+ Gets the port on which to listen for incoming requests. +

Syntax

public int Port { get; }

Value

- Documentation for this section has not yet been entered. -
+ An int that contains a port number. +

Remarks

Documentation for this section has not yet been entered. @@ -834,14 +880,14 @@

ServicePaths Property

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

+ Gets the collection of paths associated with the every WebSocket services that the server provides. +

Syntax

public IEnumerable<string> ServicePaths { get; }

Value

- Documentation for this section has not yet been entered. -
+ An IEnumerable<string> that contains the collection of paths. +

Remarks

Documentation for this section has not yet been entered. @@ -854,8 +900,8 @@

Start Method

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

+ Starts to receive incoming requests. +

Syntax

public void Start ()

Remarks

@@ -870,8 +916,8 @@

Stop Method

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

+ Stops receiving incoming requests. +

Syntax

public void Stop ()

Remarks

@@ -886,14 +932,15 @@

Sweeped Property

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

+ Gets or sets a value indicating whether the server cleans up the inactive WebSocket service instances periodically. +

Syntax

public bool Sweeped { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ true if the server cleans up the inactive WebSocket service instances every 60 seconds; + otherwise, false. The default value is true. +

Remarks

Documentation for this section has not yet been entered. diff --git a/websocket-sharp/doc/html/WebSocketSharp.Server/ResponseEventArgs.html b/websocket-sharp/doc/html/WebSocketSharp.Server/ResponseEventArgs.html index fb639039..25fc4a5e 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Server/ResponseEventArgs.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Server/ResponseEventArgs.html @@ -207,8 +207,8 @@

ResponseEventArgs Class

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

+ Contains the event data associated with the response events of the WebSocketSharp.Server.HttpServer class. +

Syntax

public class ResponseEventArgs : EventArgs
@@ -216,8 +216,10 @@

Remarks

- Documentation for this section has not yet been entered. -
+ A response event occurs when a WebSocketSharp.Server.HttpServer instance receives an HTTP request. + If you want to get the HTTP request objects, you should access the ResponseEventArgs.Request property. + If you want to get the HTTP response objects to send, you should access the ResponseEventArgs.Response property. +

Requirements

Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)
@@ -227,28 +229,6 @@ See Also: Inherited members from EventArgs.

-

Public Constructors

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

Public Properties

@@ -263,7 +243,9 @@ WebSocketSharp.Net.HttpListenerRequest - . Documentation for this section has not yet been entered. + . + Gets the HTTP request objects sent from a client. + [read-only]
@@ -275,7 +257,9 @@ WebSocketSharp.Net.HttpListenerResponse - . Documentation for this section has not yet been entered. + . + Gets the HTTP response objects to send to the client in response to the client's request. +
@@ -315,44 +299,17 @@

Member Details

-

ResponseEventArgs Constructor

-
-

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

-

Syntax

-
public ResponseEventArgs (WebSocketSharp.Net.HttpListenerContext context)
-

Parameters

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

Remarks

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

Requirements

-
- Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)
-
-

Request Property

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

+ Gets the HTTP request objects sent from a client. +

Syntax

Value

- Documentation for this section has not yet been entered. -
+ A WebSocketSharp.Net.HttpListenerRequest that contains the HTTP request objects. +

Remarks

Documentation for this section has not yet been entered. @@ -365,14 +322,14 @@

Response Property

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

+ Gets the HTTP response objects to send to the client in response to the client's request. +

Syntax

Value

- Documentation for this section has not yet been entered. -
+ A WebSocketSharp.Net.HttpListenerResponse that contains the HTTP response objects. +

Remarks

Documentation for this section has not yet been entered. diff --git a/websocket-sharp/doc/html/WebSocketSharp.Server/WebSocketServer.html b/websocket-sharp/doc/html/WebSocketSharp.Server/WebSocketServer.html index 32e2604e..339a2746 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Server/WebSocketServer.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Server/WebSocketServer.html @@ -458,9 +458,9 @@ - AddService<T> + AddWebSocketService<T> (string)
- Adds a WebSocket service. + Adds the specified type WebSocket service.
@@ -569,7 +569,7 @@ - Occurs when this server gets an error. + Occurs when the server gets an error. (Inherited from WebSocketServerBase.) @@ -817,15 +817,15 @@ Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

-

AddService<T> Generic Method

-
+

AddWebSocketService<T> Generic Method

+

- Adds a WebSocket service. + Adds the specified type WebSocket service.

Syntax

-
public void AddService<T> (string absPath)
where T : WebSocketSharp.Server.WebSocketService, new()
+
public void AddWebSocketService<T> (string absPath)
where T : WebSocketSharp.Server.WebSocketService, new()

Type Parameters

-
+
T @@ -836,7 +836,7 @@

Parameters

-
+
absPath @@ -847,11 +847,11 @@

Remarks

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

Requirements

-
+
Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

@@ -928,6 +928,7 @@

Value

true if the server cleans up the inactive clients every 60 seconds; otherwise, false. + The default value is true.

Remarks

diff --git a/websocket-sharp/doc/html/WebSocketSharp.Server/WebSocketServerBase.html b/websocket-sharp/doc/html/WebSocketSharp.Server/WebSocketServerBase.html index 44b518e2..f2bfcf86 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Server/WebSocketServerBase.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Server/WebSocketServerBase.html @@ -444,7 +444,7 @@ - Occurs when this server gets an error. + Occurs when the server gets an error. @@ -770,7 +770,7 @@

OnError Event

- Occurs when this server gets an error. + Occurs when the server gets an error.

Syntax

diff --git a/websocket-sharp/doc/html/WebSocketSharp.Server/WebSocketServiceHost`1.html b/websocket-sharp/doc/html/WebSocketSharp.Server/WebSocketServiceHost`1.html index 95ebc3b7..bc12bd36 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Server/WebSocketServiceHost`1.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Server/WebSocketServiceHost`1.html @@ -372,7 +372,7 @@ System.Net.IPAddress . - Gets the IP address on which to listen for incoming connection attempts. + Gets the local IP address on which to listen for incoming connection attempts. (Inherited from WebSocketServerBase.) @@ -386,7 +386,7 @@ bool . - Gets a value indicating whether this server provides secure connection. + Gets a value indicating whether the server provides secure connection. (Inherited from WebSocketServerBase.) @@ -400,7 +400,7 @@ bool . - Gets a value indicating whether this server is self host. + Gets a value indicating whether the server is self host. (Inherited from WebSocketServerBase.) @@ -597,7 +597,7 @@ - Occurs when this server gets an error. + Occurs when the server gets an error. (Inherited from WebSocketServerBase.) @@ -1021,6 +1021,7 @@

Value

true if the server cleans up the inactive clients every 60 seconds; otherwise, false. + The default value is true.

Remarks

diff --git a/websocket-sharp/doc/html/WebSocketSharp.Server/index.html b/websocket-sharp/doc/html/WebSocketSharp.Server/index.html index ba1d55b3..4cd86c47 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Server/index.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Server/index.html @@ -207,8 +207,8 @@ HttpServer - Documentation for this section has not yet been entered. - + Provides the functions of a simple HTTP server that allows to accept the WebSocket connection requests. + @@ -223,8 +223,8 @@ ResponseEventArgs - Documentation for this section has not yet been entered. - + Contains the event data associated with the response events of the WebSocketSharp.Server.HttpServer class. + diff --git a/websocket-sharp/doc/html/WebSocketSharp/Ext.html b/websocket-sharp/doc/html/WebSocketSharp/Ext.html index 82ce2f84..0101c943 100644 --- a/websocket-sharp/doc/html/WebSocketSharp/Ext.html +++ b/websocket-sharp/doc/html/WebSocketSharp/Ext.html @@ -328,7 +328,7 @@ GetDescription (this WebSocketSharp.Net.HttpStatusCode) : string
- Gets the description of the HTTP status code using the specified code. + Gets the description of the HTTP status code using the specified WebSocketSharp.Net.HttpStatusCode.
@@ -361,7 +361,7 @@ GetStatusDescription (this int) : string
- Gets the description of the HTTP status code using the specified code. + Gets the description of the HTTP status code using the specified int.
@@ -1089,7 +1089,7 @@

GetDescription Method

- Gets the description of the HTTP status code using the specified code. + Gets the description of the HTTP status code using the specified WebSocketSharp.Net.HttpStatusCode.

Syntax

public static string GetDescription (this WebSocketSharp.Net.HttpStatusCode code)
@@ -1100,13 +1100,13 @@ code
- One of WebSocketSharp.Net.HttpStatusCode values that contains the HTTP status code. + One of WebSocketSharp.Net.HttpStatusCode values that contains an HTTP status code.

Returns

- A string that contains the description of the code. + A string that contains the description of the HTTP status code.

Remarks

@@ -1194,7 +1194,7 @@

GetStatusDescription Method

- Gets the description of the HTTP status code using the specified code. + Gets the description of the HTTP status code using the specified int.

Syntax

public static string GetStatusDescription (this int code)
@@ -1205,13 +1205,13 @@ code
- An int that contains the HTTP status code. + An int that contains an HTTP status code.

Returns

- A string that contains the description of the code. + A string that contains the description of the HTTP status code.

Remarks

diff --git a/websocket-sharp/doc/html/index.html b/websocket-sharp/doc/html/index.html index d8bbfda0..795907d4 100644 --- a/websocket-sharp/doc/html/index.html +++ b/websocket-sharp/doc/html/index.html @@ -387,16 +387,16 @@ HttpStatusCode - Documentation for this section has not yet been entered. - + Contains the values of the HTTP status codes. + HttpVersion - Documentation for this section has not yet been entered. - + Provides the HTTP version numbers. + @@ -455,8 +455,8 @@ HttpServer - Documentation for this section has not yet been entered. - + Provides the functions of a simple HTTP server that allows to accept the WebSocket connection requests. + @@ -471,8 +471,8 @@ ResponseEventArgs - Documentation for this section has not yet been entered. - + Contains the event data associated with the response events of the WebSocketSharp.Server.HttpServer class. + diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpStatusCode.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpStatusCode.xml index b06499ea..8c7ad579 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpStatusCode.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpStatusCode.xml @@ -8,8 +8,13 @@ System.Enum - To be added. - To be added. + + Contains the values of the HTTP status codes. + + + The HttpStatusCode enumeration contains the values of the HTTP status codes defined in + RFC 2616 for HTTP 1.1. + @@ -20,7 +25,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 202. Indicates that the client's request has been accepted for processing, + but the processing has not been completed. + @@ -31,7 +39,15 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + + Equivalent to status code 300. Indicates that the requested resource corresponds to + any one of multiple representations. + + + Ambiguous is a synonym for MultipleChoices. + + @@ -42,7 +58,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 502. Indicates that a gateway or proxy server received an invalid response + from the upstream server. + @@ -53,7 +72,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 400. Indicates that the client's request could not be understood + by the server due to malformed syntax. + @@ -64,7 +86,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 409. Indicates that the client's request could not be completed + due to a conflict on the server. + @@ -75,7 +100,9 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 100. Indicates that the client should continue with its request. + @@ -86,7 +113,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 201. Indicates that the client's request has been fulfilled + and resulted in a new resource being created. + @@ -97,7 +127,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 417. Indicates that the expectation given in an Expect request header field + could not be met by the server. + @@ -108,7 +141,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 403. Indicates that the server understood the client's request + but is refusing to fulfill it. + @@ -119,7 +155,15 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + + Equivalent to status code 302. Indicates that the requested resource is located temporarily + under a different URI. + + + Found is a synonym for Redirect. + + @@ -130,7 +174,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 504. Indicates that a gateway or proxy server did not receive a timely response + from the upstream server or some other auxiliary server. + @@ -141,7 +188,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 410. Indicates that the requested resource is no longer available + at the server and no forwarding address is known. + @@ -152,7 +202,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 505. Indicates that the server does not support the HTTP version + used in the client's request. + @@ -163,7 +216,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 500. Indicates that the server encountered an unexpected condition + which prevented it from fulfilling the client's request. + @@ -174,7 +230,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 411. Indicates that the server refuses to accept the client's request + without a defined Content-Length. + @@ -185,7 +244,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 405. Indicates that the method specified in the request line + is not allowed for the resource identified by the request URI. + @@ -196,7 +258,15 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + + Equivalent to status code 301. Indicates that the requested resource has been assigned a new permanent URI + and any future references to this resource should use one of the returned URIs. + + + Moved is a synonym for MovedPermanently. + + @@ -207,7 +277,15 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + + Equivalent to status code 301. Indicates that the requested resource has been assigned a new permanent URI + and any future references to this resource should use one of the returned URIs. + + + MovedPermanently is a synonym for Moved. + + @@ -218,7 +296,15 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + + Equivalent to status code 300. Indicates that the requested resource corresponds to + any one of multiple representations. + + + MultipleChoices is a synonym for Ambiguous. + + @@ -229,7 +315,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 204. Indicates that the server has fulfilled the client's request + but does not need to return an entity-body. + @@ -240,7 +329,9 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 203. Indicates that the returned metainformation is from a local or a third-party copy instead of the origin server. + @@ -251,7 +342,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 406. Indicates that the server does not have the appropriate resource + to respond to the accept headers in the client's request. + @@ -262,7 +356,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 404. Indicates that the server has not found anything + matching the request URI. + @@ -273,7 +370,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 501. Indicates that the server does not support the functionality + required to fulfill the client's request. + @@ -284,7 +384,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 304. Indicates that the client has performed a conditional GET request + and access is allowed, but the document has not been modified. + @@ -295,7 +398,9 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 200. Indicates that the client's request has succeeded. + @@ -306,7 +411,9 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 206. Indicates that the server has fulfilled the partial GET request for the resource. + @@ -317,7 +424,9 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 402. This code is reserved for future use. + @@ -328,7 +437,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 412. Indicates that the precondition given in one or more of the request header fields + evaluated to false when it was tested on the server. + @@ -339,7 +451,9 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 407. Indicates that the client must first authenticate itself with the proxy. + @@ -350,7 +464,15 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + + Equivalent to status code 302. Indicates that the requested resource is located temporarily + under a different URI. + + + Redirect is a synonym for Found. + + @@ -361,7 +483,15 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + + Equivalent to status code 307. Indicates that the requested resource is located temporarily + under a different URI. + + + RedirectKeepVerb is a synonym for TemporaryRedirect. + + @@ -372,7 +502,15 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + + Equivalent to status code 303. Indicates that the response to the request can be found + under a different URI and should be retrieved using a GET method on that resource. + + + RedirectMethod is a synonym for SeeOther. + + @@ -383,7 +521,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 416. Indicates that none of the range specifier values in a Range request header field + overlap the current extent of the selected resource. + @@ -394,7 +535,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 413. Indicates that the client's request entity is larger + than the server is willing or able to process. + @@ -405,7 +549,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 408. Indicates that the client did not produce a request + within the time that the server was prepared to wait. + @@ -416,7 +563,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 414. Indicates that the request URI is longer + than the server is willing to interpret. + @@ -427,7 +577,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 205. Indicates that the server has fulfilled the client's request + and the user agent should reset the document view which caused the request to be sent. + @@ -438,7 +591,15 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + + Equivalent to status code 303. Indicates that the response to the request can be found + under a different URI and should be retrieved using a GET method on that resource. + + + SeeOther is a synonym for RedirectMethod. + + @@ -449,7 +610,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 503. Indicates that the server is currently unable to handle the client's request + due to a temporary overloading or maintenance of the server. + @@ -460,7 +624,9 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 101. Indicates that the server is switching the HTTP version or protocol on the connection. + @@ -471,7 +637,15 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + + Equivalent to status code 307. Indicates that the requested resource is located temporarily + under a different URI. + + + TemporaryRedirect is a synonym for RedirectKeepVerb. + + @@ -482,7 +656,9 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 401. Indicates that the client's request requires user authentication. + @@ -493,7 +669,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 415. Indicates that the entity of the client's request is in a format + not supported by the requested resource for the requested method. + @@ -504,7 +683,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 306. This code was used in a previous version of the specification, + is no longer used, and is reserved for future use. + @@ -515,7 +697,10 @@ WebSocketSharp.Net.HttpStatusCode - To be added. + + Equivalent to status code 305. Indicates that the requested resource must be accessed + through the proxy given by the Location field. + diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpVersion.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpVersion.xml index bcdc742f..4ce02876 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpVersion.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpVersion.xml @@ -9,7 +9,9 @@ - To be added. + + Provides the HTTP version numbers. + To be added. @@ -19,7 +21,9 @@ Constructor - To be added. + + Initializes a new instance of the class. + To be added. @@ -31,7 +35,9 @@ System.Version - To be added. + + Provides a instance for HTTP 1.0. + To be added. @@ -43,7 +49,9 @@ System.Version - To be added. + + Provides a instance for HTTP 1.1. + To be added. diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/HttpServer.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/HttpServer.xml index 1e77029f..5cd450d7 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/HttpServer.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/HttpServer.xml @@ -9,8 +9,35 @@ - To be added. - To be added. + + Provides the functions of a simple HTTP server that allows to accept the WebSocket connection requests. + + + + The HttpServer class provides the multi WebSocket service. + + + + The HttpServer class needs the application configuration file to configure the server root path. + + + <?xml version="1.0" encoding="utf-8"?> + <configuration> + <appSettings> + <add key="RootPath" value="./Public" /> + </appSettings> + </configuration> + + + + + <?xml version="1.0" encoding="utf-8"?> + <configuration> + <appSettings> + <add key="RootPath" value="../../Public" /> + </appSettings> + </configuration> + @@ -19,7 +46,10 @@ Constructor - To be added. + + Initializes a new instance of the class that listens for incoming requests + on port 80. + To be added. @@ -31,14 +61,19 @@ - To be added. - To be added. + + An that contains a port number. + + + Initializes a new instance of the class that listens for incoming requests + on the specified . + To be added. - - - + + + Method System.Void @@ -55,9 +90,15 @@ - To be added. - To be added. - To be added. + + The type of the WebSocket service. The T must inherit the class. + + + A that contains an absolute path associated with the WebSocket service. + + + Adds the specified type WebSocket service. + To be added. @@ -72,129 +113,155 @@ - To be added. - To be added. - To be added. + + A that contains a virtual path to the file to get. + + + Gets the contents of the specified file. + + + An array of that contains the contents of the file. + To be added. - - - + + + Event - System.EventHandler<WebSocketSharp.Server.ResponseEventArgs> + System.EventHandler<WebSocketSharp.ErrorEventArgs> - To be added. + + Occurs when the server gets an error. + To be added. - - - + + + Event System.EventHandler<WebSocketSharp.Server.ResponseEventArgs> - To be added. + + Occurs when the server receives an HTTP CONNECT request. + To be added. - - - + + + Event - System.EventHandler<WebSocketSharp.ErrorEventArgs> + System.EventHandler<WebSocketSharp.Server.ResponseEventArgs> - To be added. + + Occurs when the server receives an HTTP DELETE request. + To be added. - - - + + + Event System.EventHandler<WebSocketSharp.Server.ResponseEventArgs> - To be added. + + Occurs when the server receives an HTTP GET request. + To be added. - - - + + + Event System.EventHandler<WebSocketSharp.Server.ResponseEventArgs> - To be added. + + Occurs when the server receives an HTTP HEAD request. + To be added. - - - + + + Event System.EventHandler<WebSocketSharp.Server.ResponseEventArgs> - To be added. + + Occurs when the server receives an HTTP OPTIONS request. + To be added. - - - + + + Event System.EventHandler<WebSocketSharp.Server.ResponseEventArgs> - To be added. + + Occurs when the server receives an HTTP PATCH request. + To be added. - - - + + + Event System.EventHandler<WebSocketSharp.Server.ResponseEventArgs> - To be added. + + Occurs when the server receives an HTTP POST request. + To be added. - - - + + + Event System.EventHandler<WebSocketSharp.Server.ResponseEventArgs> - To be added. + + Occurs when the server receives an HTTP PUT request. + To be added. - - - + + + Event System.EventHandler<WebSocketSharp.Server.ResponseEventArgs> - To be added. + + Occurs when the server receives an HTTP TRACE request. + To be added. @@ -206,8 +273,12 @@ System.Int32 - To be added. - To be added. + + Gets the port on which to listen for incoming requests. + + + An that contains a port number. + To be added. @@ -219,8 +290,12 @@ System.Collections.Generic.IEnumerable<System.String> - To be added. - To be added. + + Gets the collection of paths associated with the every WebSocket services that the server provides. + + + An IEnumerable<string> that contains the collection of paths. + To be added. @@ -233,7 +308,9 @@ - To be added. + + Starts to receive incoming requests. + To be added. @@ -246,7 +323,9 @@ - To be added. + + Stops receiving incoming requests. + To be added. @@ -258,8 +337,13 @@ System.Boolean - To be added. - To be added. + + Gets or sets a value indicating whether the server cleans up the inactive WebSocket service instances periodically. + + + true if the server cleans up the inactive WebSocket service instances every 60 seconds; + otherwise, false. The default value is true. + To be added. diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/ResponseEventArgs.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/ResponseEventArgs.xml index 500a8cc4..2f65587b 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/ResponseEventArgs.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/ResponseEventArgs.xml @@ -9,23 +9,16 @@ - To be added. - To be added. + + Contains the event data associated with the response events of the class. + + + A response event occurs when a instance receives an HTTP request. + If you want to get the HTTP request objects, you should access the property. + If you want to get the HTTP response objects to send, you should access the property. + - - - - Constructor - - - - - To be added. - To be added. - To be added. - - @@ -34,8 +27,12 @@ WebSocketSharp.Net.HttpListenerRequest - To be added. - To be added. + + Gets the HTTP request objects sent from a client. + + + A that contains the HTTP request objects. + To be added. @@ -47,8 +44,12 @@ WebSocketSharp.Net.HttpListenerResponse - To be added. - To be added. + + Gets the HTTP response objects to send to the client in response to the client's request. + + + A that contains the HTTP response objects. + To be added. diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/WebSocketServer.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/WebSocketServer.xml index 29e0b8af..a9a2f431 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/WebSocketServer.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/WebSocketServer.xml @@ -155,9 +155,9 @@ To be added. - - - + + + Method System.Void @@ -181,7 +181,7 @@ A that contains an absolute path associated with the WebSocket service. - Adds a WebSocket service. + Adds the specified type WebSocket service. To be added. @@ -251,6 +251,7 @@ true if the server cleans up the inactive clients every 60 seconds; otherwise, false. + The default value is true. To be added. diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/WebSocketServerBase.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/WebSocketServerBase.xml index 4375213e..a948dd35 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/WebSocketServerBase.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/WebSocketServerBase.xml @@ -214,7 +214,7 @@ - Occurs when this server gets an error. + Occurs when the server gets an error. To be added. diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/WebSocketServiceHost`1.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/WebSocketServiceHost`1.xml index ecc0cc85..4ebdf676 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/WebSocketServiceHost`1.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/WebSocketServiceHost`1.xml @@ -286,6 +286,7 @@ true if the server cleans up the inactive clients every 60 seconds; otherwise, false. + The default value is true. To be added. diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp/Ext.xml b/websocket-sharp/doc/mdoc/WebSocketSharp/Ext.xml index ee90615f..3bd86804 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp/Ext.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp/Ext.xml @@ -270,13 +270,13 @@ - One of values that contains the HTTP status code. + One of values that contains an HTTP status code. - Gets the description of the HTTP status code using the specified code. + Gets the description of the HTTP status code using the specified . - A that contains the description of the . + A that contains the description of the HTTP status code. To be added. @@ -347,13 +347,13 @@ - An that contains the HTTP status code. + An that contains an HTTP status code. - Gets the description of the HTTP status code using the specified code. + Gets the description of the HTTP status code using the specified . - A that contains the description of the . + A that contains the description of the HTTP status code. To be added. diff --git a/websocket-sharp/doc/mdoc/index.xml b/websocket-sharp/doc/mdoc/index.xml index 997fa902..8267cddc 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 ] @@ -354,10 +354,10 @@ - One of values that contains the HTTP status code. + One of values that contains an HTTP status code. - Gets the description of the HTTP status code using the specified code. + Gets the description of the HTTP status code using the specified . @@ -437,10 +437,10 @@ - An that contains the HTTP status code. + An that contains an HTTP status code. - Gets the description of the HTTP status code using the specified code. + Gets the description of the HTTP status code using the specified . diff --git a/websocket-sharp/websocket-sharp.pidb b/websocket-sharp/websocket-sharp.pidb index 0064f8bc..8aba8585 100644 Binary files a/websocket-sharp/websocket-sharp.pidb and b/websocket-sharp/websocket-sharp.pidb differ