diff --git a/Example/bin/Debug_Ubuntu/example.exe b/Example/bin/Debug_Ubuntu/example.exe index c9867a04..33b0f2bf 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 2ba75d24..44c70af6 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 15945d58..b648c1c6 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 99628d61..98865623 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/Example1/bin/Debug_Ubuntu/example1.exe b/Example1/bin/Debug_Ubuntu/example1.exe index 145ec9e9..80a52c8f 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 f4f87c08..b56e9a95 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 15945d58..b648c1c6 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 99628d61..98865623 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/Example2/bin/Debug_Ubuntu/example2.exe b/Example2/bin/Debug_Ubuntu/example2.exe index f6233c7e..eb0e0329 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 a0759633..439888a4 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 15945d58..b648c1c6 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 99628d61..98865623 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/Example3/bin/Debug_Ubuntu/Example3.exe b/Example3/bin/Debug_Ubuntu/Example3.exe index e95873d7..3817b59a 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 8cd885a3..4bccc27c 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 15945d58..b648c1c6 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 99628d61..98865623 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/websocket-sharp/CloseEventArgs.cs b/websocket-sharp/CloseEventArgs.cs index 3df14d50..79fa8d7d 100644 --- a/websocket-sharp/CloseEventArgs.cs +++ b/websocket-sharp/CloseEventArgs.cs @@ -105,7 +105,7 @@ namespace WebSocketSharp { #endregion - #region Private Method + #region Private Methods private ushort getCodeFrom(PayloadData data) { diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index 1508fd4b..904ca64c 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -55,6 +55,12 @@ namespace WebSocketSharp { /// public static class Ext { + #region Field + + private const string _tspecials = "()<>@,;:\\\"/[]?={} \t"; + + #endregion + #region Private Methods private static void times(this ulong n, Action act) @@ -71,6 +77,21 @@ namespace WebSocketSharp { #endregion + #region Internal Method + + internal static bool IsToken(this string value) + { + foreach (char c in value) + { + if (c < 0x20 || c >= 0x7f || _tspecials.Contains (c)) + return false; + } + + return true; + } + + #endregion + #region Public Methods /// @@ -127,6 +148,28 @@ namespace WebSocketSharp { listener.BeginAcceptTcpClient(callback, null); } + /// + /// Determines whether the specified contains any of characters + /// in the specified array of . + /// + /// + /// true if contains any of ; otherwise, false. + /// + /// + /// A to test. + /// + /// + /// An array of that contains characters to find. + /// + public static bool Contains(this string str, params char[] chars) + { + return str.IsNullOrEmpty() + ? false + : chars.Length == 0 + ? true + : str.IndexOfAny(chars) != -1; + } + /// /// Emit the specified delegate if is not . /// @@ -432,7 +475,7 @@ namespace WebSocketSharp { /// Determines whether the specified is a . /// /// - /// true if the parameter is a ; otherwise, false. + /// true if is ; otherwise, false. /// /// /// A to test. @@ -442,6 +485,25 @@ namespace WebSocketSharp { return value == String.Empty ? true : false; } + /// + /// Determines whether the specified is enclosed in the specified . + /// + /// + /// true if is enclosed in ; otherwise, false. + /// + /// + /// A to test. + /// + /// + /// A that contains character to find. + /// + public static bool IsEnclosedIn(this string str, char c) + { + return str.IsNullOrEmpty() + ? false + : str[0] == c && str[str.Length - 1] == c; + } + /// /// Determines whether the specified is host (this computer architecture) byte order. /// diff --git a/websocket-sharp/MessageEventArgs.cs b/websocket-sharp/MessageEventArgs.cs index 5106e859..0592aba0 100644 --- a/websocket-sharp/MessageEventArgs.cs +++ b/websocket-sharp/MessageEventArgs.cs @@ -64,7 +64,7 @@ namespace WebSocketSharp { /// Gets the received data as a . /// /// - /// A that contains a received data. + /// A that contains the received data. /// public string Data { get { @@ -80,7 +80,7 @@ namespace WebSocketSharp { /// Gets the received data as an array of . /// /// - /// An array of that contains a received data. + /// An array of that contains the received data. /// public byte[] RawData { get { @@ -89,10 +89,10 @@ namespace WebSocketSharp { } /// - /// Gets the type of received data. + /// Gets the type of the received data. /// /// - /// One of the that indicates the type of received data. + /// One of the values that indicates the type of the received data. /// public Opcode Type { get { diff --git a/websocket-sharp/Net/Cookie.cs b/websocket-sharp/Net/Cookie.cs index 609a4b8c..30f500ad 100644 --- a/websocket-sharp/Net/Cookie.cs +++ b/websocket-sharp/Net/Cookie.cs @@ -8,7 +8,8 @@ // Daniel Nauck (dna@mono-project.de) // Sebastien Pouliot (sebastien@ximian.com) // -// Copyright (C) 2004,2009 Novell, Inc (http://www.novell.com) +// Copyright (c) 2004,2009 Novell, Inc (http://www.novell.com) +// Copyright (c) 2012-2013 sta.blockhead (sta.blockhead@gmail.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -34,66 +35,200 @@ using System; using System.Text; using System.Globalization; using System.Collections; -using System.Net; namespace WebSocketSharp.Net { - // Supported cookie formats are: - // Netscape: http://home.netscape.com/newsref/std/cookie_spec.html - // RFC 2109: http://www.ietf.org/rfc/rfc2109.txt - // RFC 2965: http://www.ietf.org/rfc/rfc2965.txt + /// + /// Provides a set of properties and methods to use to manage the HTTP Cookie. + /// + /// + /// The Cookie class cannot be inherited. + /// [Serializable] public sealed class Cookie { - #region Fields + // Supported cookie formats are: + // Netscape: http://home.netscape.com/newsref/std/cookie_spec.html + // RFC 2109: http://www.ietf.org/rfc/rfc2109.txt + // RFC 2965: http://www.ietf.org/rfc/rfc2965.txt - static char [] reservedCharsName = new char [] {' ', '=', ';', ',', '\n', '\r', '\t'}; - static char [] portSeparators = new char [] {'"', ','}; - static string tspecials = "()<>@,;:\\\"/[]?={} \t"; // from RFC 2965, 2068 + #region Static Private Fields - string comment; - Uri commentUri; - bool discard; - string domain; + static char [] reservedCharsForName = new char [] {' ', '=', ';', ',', '\n', '\r', '\t'}; + static char [] reservedCharsForValue = new char [] {';', ','}; + + #endregion + + #region Private Fields + + string comment; + Uri commentUri; + bool discard; + string domain; DateTime expires; - bool httpOnly; - string name; - string path; - string port; - int [] ports; - bool secure; + bool httpOnly; + string name; + string path; + string port; + int [] ports; + bool secure; DateTime timestamp; - string val; - int version; + string val; + int version; #endregion #region Constructors + /// + /// Initializes a new instance of the class. + /// public Cookie () { - expires = DateTime.MinValue; - timestamp = DateTime.Now; + comment = String.Empty; domain = String.Empty; + expires = DateTime.MinValue; name = String.Empty; - val = String.Empty; - comment = String.Empty; + path = String.Empty; port = String.Empty; + ports = new int [] {}; + timestamp = DateTime.Now; + val = String.Empty; + version = 0; } + /// + /// Initializes a new instance of the class + /// with the specified and . + /// + /// + /// A that contains the Name of the cookie. + /// + /// + /// A that contains the Value of the cookie. + /// + /// + /// + /// is or . + /// + /// + /// - or - + /// + /// + /// contains an invalid character. + /// + /// + /// - or - + /// + /// + /// is . + /// + /// + /// - or - + /// + /// + /// contains a string not enclosed in double quotes + /// that contains an invalid character. + /// + /// public Cookie (string name, string value) : this () { - Name = name; - Value = value; + string msg; + if (!CanSetName (name, out msg)) + throw new CookieException (msg); + + if (!CanSetValue (value, out msg)) + throw new CookieException (msg); + + this.name = name; + this.val = value; } + /// + /// Initializes a new instance of the class + /// with the specified , and . + /// + /// + /// A that contains the Name of the cookie. + /// + /// + /// A that contains the Value of the cookie. + /// + /// + /// A that contains the value of the Path attribute of the cookie. + /// + /// + /// + /// is or . + /// + /// + /// - or - + /// + /// + /// contains an invalid character. + /// + /// + /// - or - + /// + /// + /// is . + /// + /// + /// - or - + /// + /// + /// contains a string not enclosed in double quotes + /// that contains an invalid character. + /// + /// public Cookie (string name, string value, string path) : this (name, value) { Path = path; } + /// + /// Initializes a new instance of the class + /// with the specified , , + /// and . + /// + /// + /// A that contains the Name of the cookie. + /// + /// + /// A that contains the Value of the cookie. + /// + /// + /// A that contains the value of the Path attribute of the cookie. + /// + /// + /// A that contains the value of the Domain attribute of the cookie. + /// + /// + /// + /// is or . + /// + /// + /// - or - + /// + /// + /// contains an invalid character. + /// + /// + /// - or - + /// + /// + /// is . + /// + /// + /// - or - + /// + /// + /// contains a string not enclosed in double quotes + /// that contains an invalid character. + /// + /// public Cookie (string name, string value, string path, string domain) : this (name, value, path) { @@ -114,34 +249,67 @@ namespace WebSocketSharp.Net { #region Public Properties + /// + /// Gets or sets the value of the Comment attribute of the cookie. + /// + /// + /// A that contains a comment to document intended use of the cookie. + /// public string Comment { get { return comment; } - set { comment = value == null ? String.Empty : value; } + set { comment = value.IsNull () ? String.Empty : value; } } + /// + /// Gets or sets the value of the CommentURL attribute of the cookie. + /// + /// + /// A that contains a URI that provides the comment + /// to document intended use of the cookie. + /// public Uri CommentUri { get { return commentUri; } set { commentUri = value; } } + /// + /// Gets or sets a value indicating whether the client discards the cookie unconditionally + /// when the client terminates. + /// + /// + /// true if the client discards the cookie unconditionally when the client terminates; + /// otherwise, false. The default is false. + /// public bool Discard { get { return discard; } set { discard = value; } } + /// + /// Gets or sets the value of the Domain attribute of the cookie. + /// + /// + /// A that contains a URI for which the cookie is valid. + /// public string Domain { get { return domain; } set { - if (String.IsNullOrEmpty (value)) { + if (value.IsNullOrEmpty ()) { domain = String.Empty; ExactDomain = true; } else { domain = value; - ExactDomain = (value [0] != '.'); + ExactDomain = value [0] != '.'; } } } + /// + /// Gets or sets a value indicating whether the cookie has expired. + /// + /// + /// true if the cookie has expired; otherwise, false. + /// public bool Expired { get { return expires <= DateTime.Now && @@ -153,74 +321,129 @@ namespace WebSocketSharp.Net { } } + /// + /// Gets or sets the value of the Expires attribute of the cookie. + /// + /// + /// A that contains the date and time at which the cookie expires. + /// public DateTime Expires { get { return expires; } set { expires = value; } } + /// + /// Gets or sets a value indicating non-HTTP APIs can access the cookie. + /// + /// + /// true if non-HTTP APIs can not access the cookie; otherwise, false. + /// public bool HttpOnly { get { return httpOnly; } set { httpOnly = value; } } + /// + /// Gets or sets the Name of the cookie. + /// + /// + /// A that contains the Name of the cookie. + /// + /// + /// + /// The value specified for a set operation is or . + /// + /// + /// - or - + /// + /// + /// The value specified for a set operation contains an invalid character. + /// + /// public string Name { get { return name; } - set { - if (String.IsNullOrEmpty (value)) - throw new CookieException ("Name cannot be empty"); - - if (value [0] == '$' || value.IndexOfAny (reservedCharsName) != -1) { - // see CookieTest, according to MS implementation - // the name value changes even though it's incorrect - name = String.Empty; - throw new CookieException ("Name contains invalid characters"); - } + set { + string msg; + if (!CanSetName (value, out msg)) + throw new CookieException (msg); - name = value; + name = value; } } + /// + /// Gets or sets the value of the Path attribute of the cookie. + /// + /// + /// A that contains a subset of URI on the origin server + /// to which the cookie applies. + /// public string Path { - get { return (path == null) ? String.Empty : path; } - set { path = (value == null) ? String.Empty : value; } + get { return path; } + set { path = value.IsNull () ? String.Empty : value; } } + /// + /// Gets or sets the value of the Port attribute of the cookie. + /// + /// + /// A that contains a list of the TCP ports to which the cookie applies. + /// + /// + /// The value specified for a set operation could not be parsed or is not enclosed in double quotes. + /// public string Port { get { return port; } set { - if (String.IsNullOrEmpty (value)) { + if (value.IsNullOrEmpty ()) { port = String.Empty; + ports = new int [] {}; return; } - if (value [0] != '"' || value [value.Length - 1] != '"') { - throw new CookieException("The 'Port'='" + value + "' part of the cookie is invalid. Port must be enclosed by double quotes."); - } - port = value; - string [] values = port.Split (portSeparators); - ports = new int[values.Length]; - for (int i = 0; i < ports.Length; i++) { - ports [i] = Int32.MinValue; - if (values [i].Length == 0) - continue; - try { - ports [i] = Int32.Parse (values [i]); - } catch (Exception e) { - throw new CookieException("The 'Port'='" + value + "' part of the cookie is invalid. Invalid value: " + values [i], e); - } - } - Version = 1; + + if (!value.IsEnclosedIn ('"')) + throw new CookieException ("The 'Port'='" + value + "' attribute of the cookie is invalid. Port must be enclosed in double quotes."); + + string error; + if (!TryCreatePorts (value, out ports, out error)) + throw new CookieException ("The 'Port'='" + value + "' attribute of the cookie is invalid. Invalid value: " + error); + + port = value; } } + /// + /// Gets or sets a value indicating whether the security level of the cookie is secure. + /// + /// + /// When this property is true, the cookie may be included in the HTTP request + /// only if the request is transmitted over the HTTPS. + /// + /// + /// true if the security level of the cookie is secure; otherwise, false. + /// The default is false. + /// public bool Secure { get { return secure; } set { secure = value; } } + /// + /// Gets the time when the cookie was issued. + /// + /// + /// A that contains the time when the cookie was issued. + /// public DateTime TimeStamp { get { return timestamp; } } + /// + /// Gets or sets the Value of the cookie. + /// + /// + /// A that contains the Value of the cookie. + /// public string Value { get { return val; } set { @@ -233,7 +456,7 @@ namespace WebSocketSharp.Net { // the semicolon and comma characters, yet it does. For now we'll follow // the behaviour of MS.Net instead of the specs. /* - if (value.IndexOfAny(reservedCharsValue) != -1) + if (value.IndexOfAny(reservedCharsForValue) != -1) throw new CookieException("Invalid value. Value cannot contain semicolon or comma characters."); */ @@ -241,12 +464,22 @@ namespace WebSocketSharp.Net { } } + /// + /// Gets or sets the value of the Version attribute of the cookie. + /// + /// + /// An that contains the version of the HTTP state management + /// to which the cookie conforms. + /// + /// + /// The value specified for a set operation is less than zero. + /// public int Version { get { return version; } set { - if ((value < 0) || (value > 10)) - version = 0; - else + if (value < 0) + throw new ArgumentOutOfRangeException(); + else version = value; } } @@ -255,85 +488,130 @@ namespace WebSocketSharp.Net { #region Private Methods - private static int hash (int i, int j, int k, int l, int m) + static bool CanSetName (string name, out string message) { - return i ^ (j << 13 | j >> 19) ^ (k << 26 | k >> 6) ^ (l << 7 | l >> 25) ^ (m << 20 | m >> 12); + if (name.IsNullOrEmpty ()) { + message = "Name can not be null or empty."; + return false; + } + + if (name [0] == '$' || name.Contains (reservedCharsForName)) { + message = "Name contains an invalid character."; + return false; + } + + message = String.Empty; + return true; } - bool IsToken (string value) + static bool CanSetValue (string value, out string message) { - int len = value.Length; - for (int i = 0; i < len; i++) { - char c = value [i]; - if (c < 0x20 || c >= 0x7f || tspecials.IndexOf (c) != -1) + if (value.IsNull ()) { + message = "Value can not be null."; + return false; + } + + if (value.Contains (reservedCharsForValue)) { + if (!value.IsEnclosedIn ('"')) { + message = "Value contains an invalid character."; return false; + } } + + message = String.Empty; return true; } + static int Hash (int i, int j, int k, int l, int m) + { + return i ^ (j << 13 | j >> 19) ^ (k << 26 | k >> 6) ^ (l << 7 | l >> 25) ^ (m << 20 | m >> 12); + } + // See par 3.6 of RFC 2616 - string QuotedString (string value) + string Quote (string value) { - if (version == 0 || IsToken (value)) + if (version == 0 || value.IsToken ()) return value; else return "\"" + value.Replace("\"", "\\\"") + "\""; } + static bool TryCreatePorts (string value, out int [] result, out string parseError) + { + var values = value.Trim ('"').Split (','); + var tmp = new int [values.Length]; + for (int i = 0; i < values.Length; i++) { + tmp [i] = int.MinValue; + var v = values [i].Trim (); + if (v.IsEmpty ()) + continue; + + if (!int.TryParse (v, out tmp [i])) { + result = new int [] {}; + parseError = v; + return false; + } + } + + result = tmp; + parseError = String.Empty; + return true; + } + #endregion #region Internal Methods + // From server to client internal string ToClientString () { - if (name.Length == 0) + if (name.IsEmpty ()) return String.Empty; - StringBuilder result = new StringBuilder (64); - + var result = new StringBuilder (64); if (version > 0) - result.Append ("Version=").Append (version).Append (";"); + result.Append ("Version=").Append (version).Append ("; "); - result.Append (name).Append ("=").Append (val); + result.Append (name).Append ("=").Append (Quote (val)); + if (!path.IsNullOrEmpty ()) + result.Append ("; Path=").Append (path); - if (path != null && path.Length != 0) - result.Append (";Path=").Append (QuotedString (path)); + if (!domain.IsNullOrEmpty ()) + result.Append ("; Domain=").Append (domain); - if (domain != null && domain.Length != 0) - result.Append (";Domain=").Append (QuotedString (domain)); - - if (port != null && port.Length != 0) - result.Append (";Port=").Append (port); + if (!port.IsNullOrEmpty ()) + result.Append ("; Port=").Append (port); return result.ToString (); } + // From client to server internal string ToString (Uri uri) { - if (name.Length == 0) + if (name.IsEmpty ()) return String.Empty; - StringBuilder result = new StringBuilder (64); - + var result = new StringBuilder (64); if (version > 0) - result.Append ("$Version=").Append (version).Append ("; "); + result.Append ("$Version=").Append (version).Append ("; "); result.Append (name).Append ("=").Append (val); - if (version == 0) return result.ToString (); - if (!String.IsNullOrEmpty (path)) + if (!path.IsNullOrEmpty ()) result.Append ("; $Path=").Append (path); - else if (uri != null) - result.Append ("; $Path=/").Append (path); + else if (!uri.IsNull ()) + result.Append ("; $Path=").Append (uri.GetAbsolutePath ()); + else + result.Append ("; $Path=/"); - bool append_domain = (uri == null) || (uri.Host != domain); - if (append_domain && !String.IsNullOrEmpty (domain)) - result.Append ("; $Domain=").Append (domain); + bool append_domain = uri.IsNull () || uri.Host != domain; + if (append_domain && !domain.IsNullOrEmpty ()) + result.Append ("; $Domain=").Append (domain); - if (port != null && port.Length != 0) - result.Append ("; $Port=").Append (port); + if (!port.IsNullOrEmpty ()) + result.Append ("; $Port=").Append (port); return result.ToString (); } @@ -342,34 +620,57 @@ namespace WebSocketSharp.Net { #region Public Methods - public override bool Equals (Object obj) + /// + /// Determines whether the specified is equal to the current . + /// + /// + /// An to compare with the current . + /// + /// + /// true if the specified is equal to the current ; + /// otherwise, false. + /// + public override bool Equals (Object comparand) { - Cookie c = obj as Cookie; - - return c != null && - String.Compare (this.name, c.Name, true, CultureInfo.InvariantCulture) == 0 && - String.Compare (this.val, c.Value, false, CultureInfo.InvariantCulture) == 0 && - String.Compare (this.Path, c.Path, false, CultureInfo.InvariantCulture) == 0 && - String.Compare (this.domain, c.Domain, true, CultureInfo.InvariantCulture) == 0 && - this.version == c.Version; + var cookie = comparand as Cookie; + return !cookie.IsNull() && + String.Compare (this.name, cookie.Name, true, CultureInfo.InvariantCulture) == 0 && + String.Compare (this.val, cookie.Value, false, CultureInfo.InvariantCulture) == 0 && + String.Compare (this.path, cookie.Path, false, CultureInfo.InvariantCulture) == 0 && + String.Compare (this.domain, cookie.Domain, true, CultureInfo.InvariantCulture) == 0 && + this.version == cookie.Version; } + /// + /// Serves as a hash function for a object. + /// + /// + /// An that contains a hash code for this instance. + /// public override int GetHashCode () { - return hash ( + return Hash ( StringComparer.InvariantCultureIgnoreCase.GetHashCode (name), val.GetHashCode (), - Path.GetHashCode (), + path.GetHashCode (), StringComparer.InvariantCultureIgnoreCase.GetHashCode (domain), version); } - // returns a string that can be used to send a cookie to an Origin Server - // i.e., only used for clients - // see para 4.2.2 of RFC 2109 and para 3.3.4 of RFC 2965 - // see also bug #316017 - public override string ToString () + /// + /// Returns a that represents the current . + /// + /// + /// This method returns a to use to send an HTTP Cookie to an origin server. + /// + /// + /// A that represents the current . + /// + public override string ToString () { + // i.e., only used for clients + // see para 4.2.2 of RFC 2109 and para 3.3.4 of RFC 2965 + // see also bug #316017 return ToString (null); } diff --git a/websocket-sharp/Net/CookieCollection.cs b/websocket-sharp/Net/CookieCollection.cs index 390eada8..a74ff64e 100644 --- a/websocket-sharp/Net/CookieCollection.cs +++ b/websocket-sharp/Net/CookieCollection.cs @@ -7,7 +7,8 @@ // Gonzalo Paniagua Javier (gonzalo@ximian.com) // Sebastien Pouliot // -// Copyright (C) 2004,2009 Novell, Inc (http://www.novell.com) +// Copyright (c) 2004,2009 Novell, Inc (http://www.novell.com) +// Copyright (c) 2012-2013 sta.blockhead (sta.blockhead@gmail.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -33,11 +34,13 @@ using System; using System.Collections; using System.Collections.Generic; using System.Globalization; -using System.Net; using System.Runtime.Serialization; namespace WebSocketSharp.Net { + /// + /// Provides a collection container for instances of the class. + /// [Serializable] public class CookieCollection : ICollection, IEnumerable { @@ -48,7 +51,7 @@ namespace WebSocketSharp.Net { { if (x == null || y == null) return 0; - + int c1 = x.Name.Length + x.Value.Length; int c2 = y.Name.Length + y.Value.Length; @@ -56,10 +59,28 @@ namespace WebSocketSharp.Net { } } - #region Fields + #region Static Field static CookieCollectionComparer Comparer = new CookieCollectionComparer (); - List list = new List (); + + #endregion + + #region Field + + List list; + object sync; + + #endregion + + #region Constructor + + /// + /// Initializes a new instance of the class. + /// + public CookieCollection () + { + list = new List (); + } #endregion @@ -73,7 +94,12 @@ namespace WebSocketSharp.Net { #region Public Properties - // ICollection + /// + /// Gets the number of cookies contained in the . + /// + /// + /// An that indicates the number of cookies contained in the . + /// public int Count { get { return list.Count; } } @@ -81,14 +107,42 @@ namespace WebSocketSharp.Net { // LAMESPEC: So how is one supposed to create a writable CookieCollection // instance?? We simply ignore this property, as this collection is always // writable. + // + /// + /// Gets a value indicating whether the is read-only. + /// + /// + /// true if the is read-only; otherwise, false. + /// The default is true. + /// public bool IsReadOnly { get { return true; } } + /// + /// Gets a value indicating whether access to the is thread safe. + /// + /// + /// true if access to the is thread safe; otherwise, false. + /// The default is false. + /// public bool IsSynchronized { get { return false; } } + /// + /// Gets the with the specified from the . + /// + /// + /// A with the specified in the . + /// + /// + /// An that is the zero-based index of the to find. + /// + /// + /// is less than zero or is greater than or + /// equal to . + /// public Cookie this [int index] { get { if (index < 0 || index >= list.Count) @@ -98,18 +152,45 @@ namespace WebSocketSharp.Net { } } + /// + /// Gets the with the specified from the . + /// + /// + /// A with the specified in the . + /// + /// + /// A that is the name of the to find. + /// + /// + /// is . + /// public Cookie this [string name] { get { - foreach (Cookie c in list) { - if (0 == String.Compare (c.Name, name, true, CultureInfo.InvariantCulture)) - return c; + if (name.IsNull ()) + throw new ArgumentNullException ("name"); + + foreach (var cookie in list) { + if (0 == String.Compare (cookie.Name, name, true, CultureInfo.InvariantCulture)) + return cookie; } + return null; } } + /// + /// Gets an object to use to synchronize access to the . + /// + /// + /// An to use to synchronize access to the . + /// public Object SyncRoot { - get { return this; } + get { + if (sync.IsNull ()) + sync = new object (); + + return sync; + } } #endregion @@ -124,16 +205,16 @@ namespace WebSocketSharp.Net { for (int i = list.Count - 1; i >= 0; i--) { Cookie c = list [i]; - if (c.Version != cookie.Version) + if (0 != String.Compare (name, c.Name, true, CultureInfo.InvariantCulture)) continue; if (0 != String.Compare (domain, c.Domain, true, CultureInfo.InvariantCulture)) continue; - if (0 != String.Compare (name, c.Name, true, CultureInfo.InvariantCulture)) + if (0 != String.Compare (path, c.Path, false, CultureInfo.InvariantCulture)) continue; - if (0 != String.Compare (path, c.Path, true, CultureInfo.InvariantCulture)) + if (c.Version != cookie.Version) continue; return i; @@ -156,9 +237,18 @@ namespace WebSocketSharp.Net { #region Public Methods + /// + /// Add the specified to the . + /// + /// + /// A to add to the . + /// + /// + /// is . + /// public void Add (Cookie cookie) { - if (cookie == null) + if (cookie.IsNull ()) throw new ArgumentNullException ("cookie"); int pos = SearchCookie (cookie); @@ -168,25 +258,89 @@ namespace WebSocketSharp.Net { list [pos] = cookie; } + /// + /// Add the elements of the specified to the current . + /// + /// + /// A to add to the current . + /// + /// + /// is . + /// public void Add (CookieCollection cookies) { - if (cookies == null) + if (cookies.IsNull ()) throw new ArgumentNullException ("cookies"); - foreach (Cookie c in cookies) - Add (c); + foreach (Cookie cookie in cookies) + Add (cookie); } + /// + /// Copies the elements of the to the specified , + /// starting at the specified in the . + /// + /// + /// An that is the destination of the elements copied from the . + /// + /// + /// An that indicates the zero-based index in at which copying begins. + /// + /// + /// is . + /// + /// + /// is less than zero. + /// public void CopyTo (Array array, int index) { + if (array.IsNull ()) + throw new ArgumentNullException ("array"); + + if (index < 0) + throw new ArgumentOutOfRangeException ("index", "Must not be less than zero."); + + // TODO: Support for ArgumentException and InvalidCastException. + (list as IList).CopyTo (array, index); } + /// + /// Copies the elements of the to the specified array of , + /// starting at the specified in the . + /// + /// + /// An array of that is the destination of the elements copied from the . + /// + /// + /// An that indicates the zero-based index in at which copying begins. + /// + /// + /// is . + /// + /// + /// is less than zero. + /// public void CopyTo (Cookie [] array, int index) { + if (array.IsNull ()) + throw new ArgumentNullException ("array"); + + if (index < 0) + throw new ArgumentOutOfRangeException ("index", "Must not be less than zero."); + + // TODO: Support for ArgumentException. + list.CopyTo (array, index); } + /// + /// Gets the enumerator to use to iterate through the . + /// + /// + /// An instance of an implementation of the interface + /// to use to iterate through the . + /// public IEnumerator GetEnumerator () { return list.GetEnumerator (); diff --git a/websocket-sharp/Net/CookieException.cs b/websocket-sharp/Net/CookieException.cs index 24f39661..20328a99 100644 --- a/websocket-sharp/Net/CookieException.cs +++ b/websocket-sharp/Net/CookieException.cs @@ -1,10 +1,12 @@ // // CookieException.cs -// Copied from System.Net.CookieException +// Copied from System.Net.CookieException.cs // // Author: // Lawrence Pit (loz@cable.a2000.nl) // +// Copyright (c) 2012-2013 sta.blockhead (sta.blockhead@gmail.com) +// // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including @@ -28,42 +30,97 @@ using System; using System.Globalization; using System.Runtime.Serialization; +using System.Security.Permissions; namespace WebSocketSharp.Net { + /// + /// The exception that is thrown when a gets an error. + /// [Serializable] public class CookieException : FormatException, ISerializable { - // Constructors - public CookieException () - : base () + #region Internal Constructors + + internal CookieException (string message) + : base (message) { } - internal CookieException (string msg) - : base (msg) + internal CookieException (string message, Exception innerException) + : base (message, innerException) { } - internal CookieException (string msg, Exception e) - : base (msg, e) + #endregion + + #region Protected Constructor + + /// + /// Initializes a new instance of the class + /// with the specified and . + /// + /// + /// A that holds the serialized object data. + /// + /// + /// A that contains the contextual information about the source or destination. + /// + protected CookieException (SerializationInfo serializationInfo, StreamingContext streamingContext) + : base (serializationInfo, streamingContext) { } - protected CookieException (SerializationInfo info, StreamingContext context) - : base (info, context) + #endregion + + #region Public Constructor + + /// + /// Initializes a new instance of the class. + /// + public CookieException () + : base () { } - // Methods - void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context) + #endregion + + #region Explicit Interface Implementation + + /// + /// Populates the specified with the data needed to serialize the . + /// + /// + /// A that holds the serialized object data. + /// + /// + /// A that specifies the destination for the serialization. + /// + [SecurityPermission (SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter, SerializationFormatter = true)] + void ISerializable.GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext) { - base.GetObjectData (info, context); + base.GetObjectData (serializationInfo, streamingContext); } + #endregion + + #region Public Method + + /// + /// Populates the specified with the data needed to serialize the . + /// + /// + /// A that holds the serialized object data. + /// + /// + /// A that specifies the destination for the serialization. + /// + [SecurityPermission (SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData (serializationInfo, streamingContext); } + + #endregion } } diff --git a/websocket-sharp/Net/HttpListenerRequest.cs b/websocket-sharp/Net/HttpListenerRequest.cs index 9d4c2403..b7c5f5bf 100644 --- a/websocket-sharp/Net/HttpListenerRequest.cs +++ b/websocket-sharp/Net/HttpListenerRequest.cs @@ -40,7 +40,7 @@ using System.Text; namespace WebSocketSharp.Net { /// - /// Provides access to the HTTP request objects sent to a instance. + /// Provides access to a request to a instance. /// /// /// The HttpListenerRequest class cannot be inherited. @@ -84,8 +84,8 @@ namespace WebSocketSharp.Net { internal HttpListenerRequest (HttpListenerContext context) { this.context = context; - headers = new WebHeaderCollection (); - version = HttpVersion.Version10; + headers = new WebHeaderCollection (); + version = HttpVersion.Version10; } #endregion @@ -126,7 +126,7 @@ namespace WebSocketSharp.Net { /// Gets the encoding that can be used with the entity body data included in the request. /// /// - /// A that contains the encoding that can be used with entity body data. + /// A that contains the encoding that can be used with the entity body data. /// public Encoding ContentEncoding { // TODO: Always returns Encoding.Default @@ -142,7 +142,7 @@ namespace WebSocketSharp.Net { /// /// /// A that contains the value of the Content-Length entity-header field. - /// -1 if the size is not known. + /// The value is a number of bytes in the entity body data. -1 if the size is not known. /// public long ContentLength64 { get { return content_length; } diff --git a/websocket-sharp/Net/HttpListenerResponse.cs b/websocket-sharp/Net/HttpListenerResponse.cs index 183fae2b..4e6770a8 100644 --- a/websocket-sharp/Net/HttpListenerResponse.cs +++ b/websocket-sharp/Net/HttpListenerResponse.cs @@ -6,7 +6,7 @@ // Gonzalo Paniagua Javier (gonzalo@novell.com) // // Copyright (c) 2005 Novell, Inc. (http://www.novell.com) -// Copyright (c) 2012 sta.blockhead (sta.blockhead@gmail.com) +// Copyright (c) 2012-2013 sta.blockhead (sta.blockhead@gmail.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -29,13 +29,21 @@ // using System; +using System.Collections.Generic; using System.Globalization; using System.IO; +using System.Linq; using System.Net; using System.Text; namespace WebSocketSharp.Net { + /// + /// Provides access to a response to a request being processed by a instance. + /// + /// + /// The HttpListenerResponse class cannot be inherited. + /// public sealed class HttpListenerResponse : IDisposable { #region Private Fields @@ -59,7 +67,7 @@ namespace WebSocketSharp.Net { #endregion - #region Internal Fields + #region Internal Field internal bool HeadersSent; @@ -85,17 +93,29 @@ namespace WebSocketSharp.Net { #region Public Properties + /// + /// Gets or sets the encoding that can be used with the entity body data included in the response. + /// + /// + /// A that contains the encoding that can be used with the entity body data. + /// + /// + /// This object is closed. + /// + /// + /// The response has been sent already. + /// public Encoding ContentEncoding { get { if (content_encoding == null) content_encoding = Encoding.Default; + return content_encoding; } set { if (disposed) throw new ObjectDisposedException (GetType ().ToString ()); - // TODO: is null ok? if (HeadersSent) throw new InvalidOperationException ("Cannot be changed after headers are sent."); @@ -103,6 +123,22 @@ namespace WebSocketSharp.Net { } } + /// + /// Gets or sets the size of the entity body data included in the response. + /// + /// + /// A that contains the value of the Content-Length entity-header field. + /// The value is a number of bytes in the entity body data. + /// + /// + /// This object is closed. + /// + /// + /// The response has been sent already. + /// + /// + /// The value specified for a set operation is less than zero. + /// public long ContentLength64 { get { return content_length; } set { @@ -113,51 +149,103 @@ namespace WebSocketSharp.Net { throw new InvalidOperationException ("Cannot be changed after headers are sent."); if (value < 0) - throw new ArgumentOutOfRangeException ("Must be >= 0", "value"); + throw new ArgumentOutOfRangeException ("Must be greater than or equal zero.", "value"); cl_set = true; content_length = value; } } - + + /// + /// Gets or sets the media type of the entity body included in the response. + /// + /// + /// The type of the content. + /// A that contains the value of the Content-Type entity-header field. + /// + /// + /// This object is closed. + /// + /// + /// The response has been sent already. + /// + /// + /// The value specified for a set operation is . + /// + /// + /// The value specified for a set operation is a . + /// public string ContentType { get { return content_type; } set { - // TODO: is null ok? if (disposed) throw new ObjectDisposedException (GetType ().ToString ()); if (HeadersSent) throw new InvalidOperationException ("Cannot be changed after headers are sent."); + if (value.IsNull ()) + throw new ArgumentNullException ("value"); + + if (value.IsEmpty ()) + throw new ArgumentException ("Must not be empty.", "value"); + content_type = value; } } - // RFC 2109, 2965 + the netscape specification at http://wp.netscape.com/newsref/std/cookie_spec.html + /// + /// Gets or sets the cookies returned with the response. + /// + /// + /// A that contains the cookies returned with the response. + /// public CookieCollection Cookies { get { if (cookies == null) cookies = new CookieCollection (); + return cookies; } - set { cookies = value; } // null allowed? + set { cookies = value; } } + /// + /// Gets or sets the HTTP headers returned to the client. + /// + /// + /// A that contains the HTTP headers returned to the client. + /// public WebHeaderCollection Headers { get { return headers; } set { - /** - * "If you attempt to set a Content-Length, Keep-Alive, Transfer-Encoding, or - * WWW-Authenticate header using the Headers property, an exception will be - * thrown. Use the KeepAlive or ContentLength64 properties to set these headers. - * You cannot set the Transfer-Encoding or WWW-Authenticate headers manually." - */ - // TODO: check if this is marked readonly after headers are sent. + /* + * "If you attempt to set a Content-Length, Keep-Alive, Transfer-Encoding, or + * WWW-Authenticate header using the Headers property, an exception will be + * thrown. Use the KeepAlive or ContentLength64 properties to set these headers. + * You cannot set the Transfer-Encoding or WWW-Authenticate headers manually." + */ + // TODO: Support for InvalidOperationException. + + // TODO: check if this is marked readonly after headers are sent. + headers = value; } } + /// + /// Gets or sets a value indicating whether the server requests a persistent connection. + /// + /// + /// true if the server requests a persistent connection; otherwise, false. + /// The default is true. + /// + /// + /// This object is closed. + /// + /// + /// The response has been sent already. + /// public bool KeepAlive { get { return keep_alive; } set { @@ -171,8 +259,20 @@ namespace WebSocketSharp.Net { } } + /// + /// Gets a to use to write the entity body data. + /// + /// + /// A to use to write the entity body data. + /// + /// + /// This object is closed. + /// public Stream OutputStream { get { + if (disposed) + throw new ObjectDisposedException (GetType ().ToString ()); + if (output_stream == null) output_stream = context.Connection.GetResponseStream (); @@ -180,6 +280,25 @@ namespace WebSocketSharp.Net { } } + /// + /// Gets or sets the HTTP version used in the response. + /// + /// + /// A that contains the HTTP version used in the response. + /// + /// + /// This object is closed. + /// + /// + /// The response has been sent already. + /// + /// + /// The value specified for a set operation is . + /// + /// + /// The value specified for a set operation does not have its Major property set to 1 or + /// does not have its Minor property set to either 0 or 1. + /// public Version ProtocolVersion { get { return version; } set { @@ -188,20 +307,32 @@ namespace WebSocketSharp.Net { if (HeadersSent) throw new InvalidOperationException ("Cannot be changed after headers are sent."); - + if (value == null) throw new ArgumentNullException ("value"); if (value.Major != 1 || (value.Minor != 0 && value.Minor != 1)) throw new ArgumentException ("Must be 1.0 or 1.1", "value"); - if (disposed) - throw new ObjectDisposedException (GetType ().ToString ()); - version = value; } } + /// + /// Gets or sets the URL to which the client is redirected to locate a requested resource. + /// + /// + /// A that contains the value of the Location response-header field. + /// + /// + /// This object is closed. + /// + /// + /// The response has been sent already. + /// + /// + /// The value specified for a set operation is a . + /// public string RedirectLocation { get { return location; } set { @@ -211,10 +342,25 @@ namespace WebSocketSharp.Net { if (HeadersSent) throw new InvalidOperationException ("Cannot be changed after headers are sent."); + if (value.IsEmpty ()) + throw new ArgumentException ("Must not be empty.", "value"); + location = value; } } + /// + /// Gets or sets a value indicating whether the response uses the chunked transfer encoding. + /// + /// + /// true if the response uses the chunked transfer encoding; otherwise, false. + /// + /// + /// This object is closed. + /// + /// + /// The response has been sent already. + /// public bool SendChunked { get { return chunked; } set { @@ -228,6 +374,22 @@ namespace WebSocketSharp.Net { } } + /// + /// Gets or sets the HTTP status code returned to the client. + /// + /// + /// An that indicates the HTTP status code for the response to the request. + /// The default is . + /// + /// + /// This object is closed. + /// + /// + /// The response has been sent already. + /// + /// + /// The value specified for a set operation is invalid. Valid values are between 100 and 999. + /// public int StatusCode { get { return status_code; } set { @@ -245,10 +407,18 @@ namespace WebSocketSharp.Net { } } + /// + /// Gets or sets a description of the HTTP status code returned to the client. + /// + /// + /// A that contains a description of the HTTP status code returned to the client. + /// public string StatusDescription { get { return status_description; } set { - status_description = value; + status_description = value.IsNullOrEmpty () + ? status_code.GetStatusDescription () + : value; } } @@ -256,27 +426,39 @@ namespace WebSocketSharp.Net { #region Private Methods + bool CanAddOrUpdate (Cookie cookie) + { + if (Cookies.Count == 0) + return true; + + var found = FindCookie (cookie); + if (found.Count() == 0) + return true; + + foreach (var c in found) + if (c.Version == cookie.Version) + return true; + + return false; + } + void Close (bool force) { disposed = true; context.Connection.Close (force); } - bool FindCookie (Cookie cookie) + IEnumerable FindCookie (Cookie cookie) { - string name = cookie.Name; - string domain = cookie.Domain; - string path = cookie.Path; - foreach (Cookie c in cookies) { - if (name != c.Name) - continue; - if (domain != c.Domain) - continue; - if (path == c.Path) - return true; - } - - return false; + var name = cookie.Name; + var domain = cookie.Domain; + var path = cookie.Path; + + return from Cookie c in Cookies + where String.Compare (name, c.Name, true, CultureInfo.InvariantCulture) == 0 && + String.Compare (domain, c.Domain, true, CultureInfo.InvariantCulture) == 0 && + String.Compare (path, c.Path, false, CultureInfo.InvariantCulture) == 0 + select c; } void Init () @@ -308,7 +490,7 @@ namespace WebSocketSharp.Net { } if (headers ["Server"] == null) - headers.SetInternal ("Server", "Mono-HTTPAPI/1.0"); + headers.SetInternal ("Server", "WebSocketSharp-HTTPAPI/1.0"); CultureInfo inv = CultureInfo.InvariantCulture; if (headers ["Date"] == null) @@ -394,6 +576,9 @@ namespace WebSocketSharp.Net { #region Explicit Interface Implementation + /// + /// Releases all resource used by the . + /// void IDisposable.Dispose () { Close (true); // TODO: Abort or Close? @@ -403,6 +588,9 @@ namespace WebSocketSharp.Net { #region Public Methods + /// + /// Closes the connection to the client without sending a response. + /// public void Abort () { if (disposed) @@ -411,21 +599,44 @@ namespace WebSocketSharp.Net { Close (true); } + /// + /// Adds the specified HTTP header and to + /// the headers for this response. + /// + /// + /// A that contains the name of the HTTP header to add. + /// + /// + /// A that contains the value of the HTTP header to add. + /// + /// + /// is or . + /// + /// + /// The length of is greater than 65,535 characters. + /// public void AddHeader (string name, string value) { - if (name == null) + if (name.IsNullOrEmpty()) throw new ArgumentNullException ("name"); - if (name == "") - throw new ArgumentException ("'name' cannot be empty", "name"); + // TODO: Check for forbidden headers and invalid characters. - // TODO: check for forbidden headers and invalid characters if (value.Length > 65535) throw new ArgumentOutOfRangeException ("value"); headers.Set (name, value); } + /// + /// Adds the specified to the sent with the response. + /// + /// + /// A to add to the . + /// + /// + /// is . + /// public void AppendCookie (Cookie cookie) { if (cookie == null) @@ -434,13 +645,26 @@ namespace WebSocketSharp.Net { Cookies.Add (cookie); } + /// + /// Appends a to the specified HTTP header sent with the response. + /// + /// + /// A that contains the name of the HTTP header to append to. + /// + /// + /// A that contains the value to append to the HTTP header. + /// + /// + /// is or . + /// + /// + /// The length of is greater than 65,535 characters. + /// public void AppendHeader (string name, string value) { - if (name == null) - throw new ArgumentNullException ("name"); - - if (name == "") - throw new ArgumentException ("'name' cannot be empty", "name"); + // TODO: Check for forbidden headers and invalid characters. + if (name.IsNullOrEmpty()) + throw new ArgumentException ("'name' cannot be null or empty", "name"); if (value.Length > 65535) throw new ArgumentOutOfRangeException ("value"); @@ -448,6 +672,10 @@ namespace WebSocketSharp.Net { headers.Add (name, value); } + /// + /// Sends the response to the client and releases the resources associated with + /// the instance. + /// public void Close () { if (disposed) @@ -456,20 +684,42 @@ namespace WebSocketSharp.Net { Close (false); } + /// + /// Sends the response with the specified array of to the client and + /// releases the resources associated with the instance. + /// + /// + /// An array of that contains the response entity body data. + /// + /// + /// true if this method blocks execution while flushing the stream to the client; otherwise, false. + /// + /// + /// is . + /// + /// + /// This object is closed. + /// public void Close (byte [] responseEntity, bool willBlock) { if (disposed) - return; + throw new ObjectDisposedException (GetType ().ToString ()); if (responseEntity == null) throw new ArgumentNullException ("responseEntity"); - // TODO: if willBlock -> BeginWrite + Close ? + // TODO: If willBlock -> BeginWrite + Close? ContentLength64 = responseEntity.Length; OutputStream.Write (responseEntity, 0, (int) content_length); Close (false); } + /// + /// Copies properties from the specified to this response. + /// + /// + /// A to copy. + /// public void CopyFrom (HttpListenerResponse templateResponse) { headers.Clear (); @@ -481,25 +731,40 @@ namespace WebSocketSharp.Net { version = templateResponse.version; } + /// + /// Configures the response to redirect the client's request to the specified . + /// + /// + /// A that contains a URL to redirect the client's request to. + /// public void Redirect (string url) { - StatusCode = 302; // Found + StatusCode = (int) HttpStatusCode.Redirect; location = url; } + /// + /// Adds or updates a in the sent with the response. + /// + /// + /// A to set. + /// + /// + /// is . + /// + /// + /// already exists in the and + /// could not be replaced. + /// public void SetCookie (Cookie cookie) { - if (cookie == null) + if (cookie.IsNull()) throw new ArgumentNullException ("cookie"); - if (cookies != null) { - if (FindCookie (cookie)) - throw new ArgumentException ("The cookie already exists."); - } else { - cookies = new CookieCollection (); - } + if (!CanAddOrUpdate (cookie)) + throw new ArgumentException ("Cannot be replaced.", "cookie"); - cookies.Add (cookie); + Cookies.Add (cookie); } #endregion diff --git a/websocket-sharp/Server/HttpRequestEventArgs.cs b/websocket-sharp/Server/HttpRequestEventArgs.cs index 87cbbdba..8a0a4a3b 100644 --- a/websocket-sharp/Server/HttpRequestEventArgs.cs +++ b/websocket-sharp/Server/HttpRequestEventArgs.cs @@ -36,8 +36,8 @@ namespace WebSocketSharp.Server { /// /// /// An HTTP request 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. + /// 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 HttpRequestEventArgs : EventArgs { diff --git a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll index 15945d58..b648c1c6 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 99628d61..98865623 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_Ubuntu/websocket-sharp.dll b/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll index d744837e..8fd26259 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 302248e0..3a9770d8 100644 --- a/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.xml +++ b/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.xml @@ -43,6 +43,21 @@ is . + + + Determines whether the specified contains any of characters + in the specified array of . + + + true if contains any of ; otherwise, false. + + + A to test. + + + An array of that contains characters to find. + + Emit the specified delegate if is not . @@ -206,12 +221,26 @@ Determines whether the specified is a . - true if the parameter is a ; otherwise, false. + true if is ; otherwise, false. A to test. + + + Determines whether the specified is enclosed in the specified . + + + true if is enclosed in ; otherwise, false. + + + A to test. + + + A that contains character to find. + + Determines whether the specified is host (this computer architecture) byte order. @@ -714,7 +743,7 @@ Gets the received data as a . - A that contains a received data. + A that contains the received data. @@ -722,15 +751,15 @@ Gets the received data as an array of . - An array of that contains a received data. + An array of that contains the received data. - Gets the type of received data. + Gets the type of the received data. - One of the that indicates the type of received data. + One of the values that indicates the type of the received data. @@ -739,8 +768,8 @@ The event occurs when the WebSocket receives a close control frame or - the WebSocket.Close method is called. If you want to get the reason for closure, you should access the or - properties. + the WebSocket.Close method is called. If you want to get the reason for closure, you should access + the or properties. @@ -761,10 +790,10 @@ - Indicates whether the connection closed cleanly or not. + Indicates whether the WebSocket connection closed cleanly. - true if the connection closed cleanly; otherwise, false. + true if the WebSocket connection closed cleanly; otherwise, false. @@ -1472,6 +1501,491 @@ Indicates anonymous authentication. + + + Provides a set of properties and methods to use to manage the HTTP Cookie. + + + The Cookie class cannot be inherited. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified and . + + + A that contains the Name of the cookie. + + + A that contains the Value of the cookie. + + + + is or . + + + - or - + + + contains an invalid character. + + + - or - + + + is . + + + - or - + + + contains a string not enclosed in double quotes + that contains an invalid character. + + + + + + Initializes a new instance of the class + with the specified , and . + + + A that contains the Name of the cookie. + + + A that contains the Value of the cookie. + + + A that contains the value of the Path attribute of the cookie. + + + + is or . + + + - or - + + + contains an invalid character. + + + - or - + + + is . + + + - or - + + + contains a string not enclosed in double quotes + that contains an invalid character. + + + + + + Initializes a new instance of the class + with the specified , , + and . + + + A that contains the Name of the cookie. + + + A that contains the Value of the cookie. + + + A that contains the value of the Path attribute of the cookie. + + + A that contains the value of the Domain attribute of the cookie. + + + + is or . + + + - or - + + + contains an invalid character. + + + - or - + + + is . + + + - or - + + + contains a string not enclosed in double quotes + that contains an invalid character. + + + + + + Gets or sets the value of the Comment attribute of the cookie. + + + A that contains a comment to document intended use of the cookie. + + + + + Gets or sets the value of the CommentURL attribute of the cookie. + + + A that contains a URI that provides the comment + to document intended use of the cookie. + + + + + Gets or sets a value indicating whether the client discards the cookie unconditionally + when the client terminates. + + + true if the client discards the cookie unconditionally when the client terminates; + otherwise, false. The default is false. + + + + + Gets or sets the value of the Domain attribute of the cookie. + + + A that contains a URI for which the cookie is valid. + + + + + Gets or sets a value indicating whether the cookie has expired. + + + true if the cookie has expired; otherwise, false. + + + + + Gets or sets the value of the Expires attribute of the cookie. + + + A that contains the date and time at which the cookie expires. + + + + + Gets or sets a value indicating non-HTTP APIs can access the cookie. + + + true if non-HTTP APIs can not access the cookie; otherwise, false. + + + + + Gets or sets the Name of the cookie. + + + A that contains the Name of the cookie. + + + + The value specified for a set operation is or . + + + - or - + + + The value specified for a set operation contains an invalid character. + + + + + + Gets or sets the value of the Path attribute of the cookie. + + + A that contains a subset of URI on the origin server + to which the cookie applies. + + + + + Gets or sets the value of the Port attribute of the cookie. + + + A that contains a list of the TCP ports to which the cookie applies. + + + The value specified for a set operation could not be parsed or is not enclosed in double quotes. + + + + + Gets or sets a value indicating whether the security level of the cookie is secure. + + + When this property is true, the cookie may be included in the HTTP request + only if the request is transmitted over the HTTPS. + + + true if the security level of the cookie is secure; otherwise, false. + The default is false. + + + + + Gets the time when the cookie was issued. + + + A that contains the time when the cookie was issued. + + + + + Gets or sets the Value of the cookie. + + + A that contains the Value of the cookie. + + + + + Gets or sets the value of the Version attribute of the cookie. + + + An that contains the version of the HTTP state management + to which the cookie conforms. + + + The value specified for a set operation is less than zero. + + + + + Determines whether the specified is equal to the current . + + + An to compare with the current . + + + true if the specified is equal to the current ; + otherwise, false. + + + + + Serves as a hash function for a object. + + + An that contains a hash code for this instance. + + + + + Returns a that represents the current . + + + This method returns a to use to send an HTTP Cookie to an origin server. + + + A that represents the current . + + + + + Provides a collection container for instances of the class. + + + + + Initializes a new instance of the class. + + + + + Gets the with the specified from the . + + + A with the specified in the . + + + An that is the zero-based index of the to find. + + + is less than zero or is greater than or + equal to . + + + + + Gets the with the specified from the . + + + A with the specified in the . + + + A that is the name of the to find. + + + is . + + + + + Gets the number of cookies contained in the . + + + An that indicates the number of cookies contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + The default is true. + + + + + Gets a value indicating whether access to the is thread safe. + + + true if access to the is thread safe; otherwise, false. + The default is false. + + + + + Gets an object to use to synchronize access to the . + + + An to use to synchronize access to the . + + + + + Add the specified to the . + + + A to add to the . + + + is . + + + + + Add the elements of the specified to the current . + + + A to add to the current . + + + is . + + + + + Copies the elements of the to the specified , + starting at the specified in the . + + + An that is the destination of the elements copied from the . + + + An that indicates the zero-based index in at which copying begins. + + + is . + + + is less than zero. + + + + + Copies the elements of the to the specified array of , + starting at the specified in the . + + + An array of that is the destination of the elements copied from the . + + + An that indicates the zero-based index in at which copying begins. + + + is . + + + is less than zero. + + + + + Gets the enumerator to use to iterate through the . + + + An instance of an implementation of the interface + to use to iterate through the . + + + + + The exception that is thrown when a gets an error. + + + + + Initializes a new instance of the class + with the specified and . + + + A that holds the serialized object data. + + + A that contains the contextual information about the source or destination. + + + + + Initializes a new instance of the class. + + + + + Populates the specified with the data needed to serialize the . + + + A that holds the serialized object data. + + + A that specifies the destination for the serialization. + + + + + Populates the specified with the data needed to serialize the . + + + A that holds the serialized object data. + + + A that specifies the destination for the serialization. + + Provides a simple, programmatically controlled HTTP listener. @@ -1846,7 +2360,7 @@ - Provides access to the HTTP request objects sent to a instance. + Provides access to a request to a instance. The HttpListenerRequest class cannot be inherited. @@ -1874,7 +2388,7 @@ Gets the encoding that can be used with the entity body data included in the request. - A that contains the encoding that can be used with entity body data. + A that contains the encoding that can be used with the entity body data. @@ -1883,7 +2397,7 @@ A that contains the value of the Content-Length entity-header field. - -1 if the size is not known. + The value is a number of bytes in the entity body data. -1 if the size is not known. @@ -2120,6 +2634,298 @@ This method is not implemented. + + + Provides access to a response to a request being processed by a instance. + + + The HttpListenerResponse class cannot be inherited. + + + + + Gets or sets the encoding that can be used with the entity body data included in the response. + + + A that contains the encoding that can be used with the entity body data. + + + This object is closed. + + + The response has been sent already. + + + + + Gets or sets the size of the entity body data included in the response. + + + A that contains the value of the Content-Length entity-header field. + The value is a number of bytes in the entity body data. + + + This object is closed. + + + The response has been sent already. + + + The value specified for a set operation is less than zero. + + + + + Gets or sets the media type of the entity body included in the response. + + + The type of the content. + A that contains the value of the Content-Type entity-header field. + + + This object is closed. + + + The response has been sent already. + + + The value specified for a set operation is . + + + The value specified for a set operation is a . + + + + + Gets or sets the cookies returned with the response. + + + A that contains the cookies returned with the response. + + + + + Gets or sets the HTTP headers returned to the client. + + + A that contains the HTTP headers returned to the client. + + + + + Gets or sets a value indicating whether the server requests a persistent connection. + + + true if the server requests a persistent connection; otherwise, false. + The default is true. + + + This object is closed. + + + The response has been sent already. + + + + + Gets a to use to write the entity body data. + + + A to use to write the entity body data. + + + This object is closed. + + + + + Gets or sets the HTTP version used in the response. + + + A that contains the HTTP version used in the response. + + + This object is closed. + + + The response has been sent already. + + + The value specified for a set operation is . + + + The value specified for a set operation does not have its Major property set to 1 or + does not have its Minor property set to either 0 or 1. + + + + + Gets or sets the URL to which the client is redirected to locate a requested resource. + + + A that contains the value of the Location response-header field. + + + This object is closed. + + + The response has been sent already. + + + The value specified for a set operation is a . + + + + + Gets or sets a value indicating whether the response uses the chunked transfer encoding. + + + true if the response uses the chunked transfer encoding; otherwise, false. + + + This object is closed. + + + The response has been sent already. + + + + + Gets or sets the HTTP status code returned to the client. + + + An that indicates the HTTP status code for the response to the request. + The default is . + + + This object is closed. + + + The response has been sent already. + + + The value specified for a set operation is invalid. Valid values are between 100 and 999. + + + + + Gets or sets a description of the HTTP status code returned to the client. + + + A that contains a description of the HTTP status code returned to the client. + + + + + Releases all resource used by the . + + + + + Closes the connection to the client without sending a response. + + + + + Adds the specified HTTP header and to + the headers for this response. + + + A that contains the name of the HTTP header to add. + + + A that contains the value of the HTTP header to add. + + + is or . + + + The length of is greater than 65,535 characters. + + + + + Adds the specified to the sent with the response. + + + A to add to the . + + + is . + + + + + Appends a to the specified HTTP header sent with the response. + + + A that contains the name of the HTTP header to append to. + + + A that contains the value to append to the HTTP header. + + + is or . + + + The length of is greater than 65,535 characters. + + + + + Sends the response to the client and releases the resources associated with + the instance. + + + + + Sends the response with the specified array of to the client and + releases the resources associated with the instance. + + + An array of that contains the response entity body data. + + + true if this method blocks execution while flushing the stream to the client; otherwise, false. + + + is . + + + This object is closed. + + + + + Copies properties from the specified to this response. + + + A to copy. + + + + + Configures the response to redirect the client's request to the specified . + + + A that contains a URL to redirect the client's request to. + + + + + Adds or updates a in the sent with the response. + + + A to set. + + + is . + + + already exists in the and + could not be replaced. + + Decodes an HTML-encoded string and returns the decoded string. @@ -3663,8 +4469,8 @@ An HTTP request 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. + 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. diff --git a/websocket-sharp/doc/html/WebSocketSharp.Net/Cookie.html b/websocket-sharp/doc/html/WebSocketSharp.Net/Cookie.html index deb1bffc..349fd088 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Net/Cookie.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Net/Cookie.html @@ -207,8 +207,8 @@

Cookie Class

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

+ Provides a set of properties and methods to use to manage the HTTP Cookie. +

Syntax

public sealed class Cookie
@@ -216,8 +216,8 @@

Remarks

- Documentation for this section has not yet been entered. -
+ The Cookie class cannot be inherited. +

Requirements

Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
@@ -243,8 +243,8 @@ ()
- Documentation for this section has not yet been entered. - + Initializes a new instance of the WebSocketSharp.Net.Cookie class. + @@ -258,8 +258,9 @@ (string, string) - Documentation for this section has not yet been entered. - + Initializes a new instance of the WebSocketSharp.Net.Cookie class + with the specified name and value. + @@ -273,8 +274,9 @@ (string, string, string) - Documentation for this section has not yet been entered. - + Initializes a new instance of the WebSocketSharp.Net.Cookie class + with the specified name, value and path. + @@ -288,8 +290,10 @@ (string, string, string, string) - Documentation for this section has not yet been entered. - + Initializes a new instance of the WebSocketSharp.Net.Cookie class + with the specified name, value, + path and domain. + @@ -311,7 +315,9 @@ string - . Documentation for this section has not yet been entered. + . + Gets or sets the value of the Comment attribute of the cookie. + @@ -326,7 +332,9 @@ Uri - . Documentation for this section has not yet been entered. + . + Gets or sets the value of the CommentURL attribute of the cookie. + @@ -341,7 +349,10 @@ bool - . Documentation for this section has not yet been entered. + . + Gets or sets a value indicating whether the client discards the cookie unconditionally + when the client terminates. + @@ -356,7 +367,9 @@ string - . Documentation for this section has not yet been entered. + . + Gets or sets the value of the Domain attribute of the cookie. + @@ -371,7 +384,9 @@ bool - . Documentation for this section has not yet been entered. + . + Gets or sets a value indicating whether the cookie has expired. + @@ -386,7 +401,9 @@ DateTime - . Documentation for this section has not yet been entered. + . + Gets or sets the value of the Expires attribute of the cookie. + @@ -401,7 +418,9 @@ bool - . Documentation for this section has not yet been entered. + . + Gets or sets a value indicating non-HTTP APIs can access the cookie. + @@ -416,7 +435,9 @@ string - . Documentation for this section has not yet been entered. + . + Gets or sets the Name of the cookie. + @@ -431,7 +452,9 @@ string - . Documentation for this section has not yet been entered. + . + Gets or sets the value of the Path attribute of the cookie. + @@ -446,7 +469,9 @@ string - . Documentation for this section has not yet been entered. + . + Gets or sets the value of the Port attribute of the cookie. + @@ -461,7 +486,9 @@ bool - . Documentation for this section has not yet been entered. + . + Gets or sets a value indicating whether the security level of the cookie is secure. + [read-only]
@@ -473,7 +500,9 @@ DateTime - . Documentation for this section has not yet been entered. + . + Gets the time when the cookie was issued. + @@ -488,7 +517,9 @@ string - . Documentation for this section has not yet been entered. + . + Gets or sets the Value of the cookie. + @@ -503,7 +534,9 @@ int - . Documentation for this section has not yet been entered. + . + Gets or sets the value of the Version attribute of the cookie. + @@ -519,7 +552,9 @@ Equals - (object) : bool
Documentation for this section has not yet been entered.
+ (object) : bool
+ Determines whether the specified object is equal to the current WebSocketSharp.Net.Cookie. +
@@ -528,7 +563,9 @@ GetHashCode - () : int
Documentation for this section has not yet been entered.
+ () : int
+ Serves as a hash function for a WebSocketSharp.Net.Cookie object. +
@@ -537,7 +574,9 @@ ToString - () : string
Documentation for this section has not yet been entered.
+ () : string
+ Returns a string that represents the current WebSocketSharp.Net.Cookie. +
@@ -580,8 +619,8 @@

Cookie Constructor

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

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

Syntax

public Cookie ()

Remarks

@@ -596,8 +635,9 @@

Cookie Constructor

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

+ Initializes a new instance of the WebSocketSharp.Net.Cookie class + with the specified name and value. +

Syntax

public Cookie (string name, string value)

Parameters

@@ -607,16 +647,54 @@ name
- Documentation for this section has not yet been entered. -
+ A string that contains the Name of the cookie. +
value
- Documentation for this section has not yet been entered. -
+ A string that contains the Value of the cookie. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ WebSocketSharp.Net.CookieException + +

+ name is null or string.Empty. +

+

+ - or - +

+

+ name contains an invalid character. +

+

+ - or - +

+

+ value is null. +

+

+ - or - +

+

+ value contains a string not enclosed in double quotes + that contains an invalid character. +

+
+

Remarks

Documentation for this section has not yet been entered. @@ -629,8 +707,9 @@

Cookie Constructor

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

+ Initializes a new instance of the WebSocketSharp.Net.Cookie class + with the specified name, value and path. +

Syntax

public Cookie (string name, string value, string path)

Parameters

@@ -640,22 +719,60 @@ name
- Documentation for this section has not yet been entered. -
+ A string that contains the Name of the cookie. +
value
- Documentation for this section has not yet been entered. -
+ A string that contains the Value of the cookie. +
path
- Documentation for this section has not yet been entered. -
+ A string that contains the value of the Path attribute of the cookie. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ WebSocketSharp.Net.CookieException + +

+ name is null or string.Empty. +

+

+ - or - +

+

+ name contains an invalid character. +

+

+ - or - +

+

+ value is null. +

+

+ - or - +

+

+ value contains a string not enclosed in double quotes + that contains an invalid character. +

+
+

Remarks

Documentation for this section has not yet been entered. @@ -668,8 +785,10 @@

Cookie Constructor

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

+ Initializes a new instance of the WebSocketSharp.Net.Cookie class + with the specified name, value, + path and domain. +

Syntax

public Cookie (string name, string value, string path, string domain)

Parameters

@@ -679,28 +798,66 @@ name
- Documentation for this section has not yet been entered. -
+ A string that contains the Name of the cookie. +
value
- Documentation for this section has not yet been entered. -
+ A string that contains the Value of the cookie. +
path
- Documentation for this section has not yet been entered. -
+ A string that contains the value of the Path attribute of the cookie. +
domain
- Documentation for this section has not yet been entered. -
+ A string that contains the value of the Domain attribute of the cookie. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ WebSocketSharp.Net.CookieException + +

+ name is null or string.Empty. +

+

+ - or - +

+

+ name contains an invalid character. +

+

+ - or - +

+

+ value is null. +

+

+ - or - +

+

+ value contains a string not enclosed in double quotes + that contains an invalid character. +

+
+

Remarks

Documentation for this section has not yet been entered. @@ -713,14 +870,14 @@

Comment Property

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

+ Gets or sets the value of the Comment attribute of the cookie. +

Syntax

public string Comment { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ A string that contains a comment to document intended use of the cookie. +

Remarks

Documentation for this section has not yet been entered. @@ -733,14 +890,15 @@

CommentUri Property

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

+ Gets or sets the value of the CommentURL attribute of the cookie. +

Syntax

public Uri CommentUri { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ A Uri that contains a URI that provides the comment + to document intended use of the cookie. +

Remarks

Documentation for this section has not yet been entered. @@ -753,14 +911,16 @@

Discard Property

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

+ Gets or sets a value indicating whether the client discards the cookie unconditionally + when the client terminates. +

Syntax

public bool Discard { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ true if the client discards the cookie unconditionally when the client terminates; + otherwise, false. The default is false. +

Remarks

Documentation for this section has not yet been entered. @@ -773,14 +933,14 @@

Domain Property

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

+ Gets or sets the value of the Domain attribute of the cookie. +

Syntax

public string Domain { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ A string that contains a URI for which the cookie is valid. +

Remarks

Documentation for this section has not yet been entered. @@ -793,25 +953,26 @@

Equals Method

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

+ Determines whether the specified object is equal to the current WebSocketSharp.Net.Cookie. +

Syntax

-
public override bool Equals (object obj)
+
public override bool Equals (object comparand)

Parameters

- obj + comparand
- Documentation for this section has not yet been entered. -
+ An object to compare with the current WebSocketSharp.Net.Cookie. +

Returns

- Documentation for this section has not yet been entered. -
+ true if the specified object is equal to the current WebSocketSharp.Net.Cookie; + otherwise, false. +

Remarks

Documentation for this section has not yet been entered. @@ -824,14 +985,14 @@

Expired Property

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

+ Gets or sets a value indicating whether the cookie has expired. +

Syntax

public bool Expired { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ true if the cookie has expired; otherwise, false. +

Remarks

Documentation for this section has not yet been entered. @@ -844,14 +1005,14 @@

Expires Property

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

+ Gets or sets the value of the Expires attribute of the cookie. +

Syntax

public DateTime Expires { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ A DateTime that contains the date and time at which the cookie expires. +

Remarks

Documentation for this section has not yet been entered. @@ -864,14 +1025,14 @@

GetHashCode Method

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

+ Serves as a hash function for a WebSocketSharp.Net.Cookie object. +

Syntax

public override int GetHashCode ()

Returns

- Documentation for this section has not yet been entered. -
+ An int that contains a hash code for this instance. +

Remarks

Documentation for this section has not yet been entered. @@ -884,14 +1045,14 @@

HttpOnly Property

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

+ Gets or sets a value indicating non-HTTP APIs can access the cookie. +

Syntax

public bool HttpOnly { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ true if non-HTTP APIs can not access the cookie; otherwise, false. +

Remarks

Documentation for this section has not yet been entered. @@ -904,13 +1065,38 @@

Name Property

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

+ Gets or sets the Name of the cookie. +

Syntax

public string Name { get; set; }

Value

- Documentation for this section has not yet been entered. + A string that contains the Name of the cookie. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ WebSocketSharp.Net.CookieException + +

+ The value specified for a set operation is null or string.Empty. +

+

+ - or - +

+

+ The value specified for a set operation contains an invalid character. +

+

Remarks

@@ -924,14 +1110,15 @@

Path Property

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

+ Gets or sets the value of the Path attribute of the cookie. +

Syntax

public string Path { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ A string that contains a subset of URI on the origin server + to which the cookie applies. +

Remarks

Documentation for this section has not yet been entered. @@ -944,13 +1131,30 @@

Port Property

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

+ Gets or sets the value of the Port attribute of the cookie. +

Syntax

public string Port { get; set; }

Value

- Documentation for this section has not yet been entered. + A string that contains a list of the TCP ports to which the cookie applies. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ WebSocketSharp.Net.CookieException + + The value specified for a set operation could not be parsed or is not enclosed in double quotes. +

Remarks

@@ -964,18 +1168,20 @@

Secure Property

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

+ Gets or sets a value indicating whether the security level of the cookie is secure. +

Syntax

public bool Secure { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ true if the security level of the cookie is secure; otherwise, false. + The default is false. +

Remarks

- Documentation for this section has not yet been entered. -
+ When this property is true, the cookie may be included in the HTTP request + only if the request is transmitted over the HTTPS. +

Requirements

Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
@@ -984,14 +1190,14 @@

TimeStamp Property

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

+ Gets the time when the cookie was issued. +

Syntax

public DateTime TimeStamp { get; }

Value

- Documentation for this section has not yet been entered. -
+ A DateTime that contains the time when the cookie was issued. +

Remarks

Documentation for this section has not yet been entered. @@ -1004,18 +1210,18 @@

ToString Method

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

+ Returns a string that represents the current WebSocketSharp.Net.Cookie. +

Syntax

public override string ToString ()

Returns

- Documentation for this section has not yet been entered. -
+ A string that represents the current WebSocketSharp.Net.Cookie. +

Remarks

- Documentation for this section has not yet been entered. -
+ This method returns a string to use to send an HTTP Cookie to an origin server. +

Requirements

Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
@@ -1024,14 +1230,14 @@

Value Property

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

+ Gets or sets the Value of the cookie. +

Syntax

public string Value { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ A string that contains the Value of the cookie. +

Remarks

Documentation for this section has not yet been entered. @@ -1044,13 +1250,31 @@

Version Property

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

+ Gets or sets the value of the Version attribute of the cookie. +

Syntax

public int Version { get; set; }

Value

- Documentation for this section has not yet been entered. + An int that contains the version of the HTTP state management + to which the cookie conforms. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ArgumentOutOfRangeException + + The value specified for a set operation is less than zero. +

Remarks

diff --git a/websocket-sharp/doc/html/WebSocketSharp.Net/CookieCollection.html b/websocket-sharp/doc/html/WebSocketSharp.Net/CookieCollection.html index d9e3ad41..35f155be 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Net/CookieCollection.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Net/CookieCollection.html @@ -207,8 +207,8 @@

CookieCollection Class

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

+ Provides a collection container for instances of the WebSocketSharp.Net.Cookie class. +

Syntax

public class CookieCollection : ICollection
@@ -243,8 +243,8 @@ ()
- Documentation for this section has not yet been entered. - + Initializes a new instance of the WebSocketSharp.Net.CookieCollection class. +
@@ -263,7 +263,9 @@ int - . Documentation for this section has not yet been entered. + . + Gets the number of cookies contained in the WebSocketSharp.Net.CookieCollection. + [read-only]
@@ -275,7 +277,9 @@ bool - . Documentation for this section has not yet been entered. + . + Gets a value indicating whether the WebSocketSharp.Net.CookieCollection is read-only. + [read-only]
@@ -287,7 +291,9 @@ bool - . Documentation for this section has not yet been entered. + . + Gets a value indicating whether access to the WebSocketSharp.Net.CookieCollection is thread safe. + [read-only]
default property
@@ -298,7 +304,9 @@ Cookie - . Documentation for this section has not yet been entered. + . + Gets the WebSocketSharp.Net.Cookie with the specified index from the WebSocketSharp.Net.CookieCollection. + [read-only]
default property
@@ -309,7 +317,9 @@ Cookie - . Documentation for this section has not yet been entered. + . + Gets the WebSocketSharp.Net.Cookie with the specified name from the WebSocketSharp.Net.CookieCollection. + [read-only]
@@ -321,7 +331,9 @@ object - . Documentation for this section has not yet been entered. + . + Gets an object to use to synchronize access to the WebSocketSharp.Net.CookieCollection. +
@@ -338,7 +350,9 @@ Add - (Cookie)
Documentation for this section has not yet been entered.
+ (Cookie)
+ Add the specified WebSocketSharp.Net.Cookie to the WebSocketSharp.Net.CookieCollection. +
@@ -348,7 +362,9 @@ Add - (CookieCollection)
Documentation for this section has not yet been entered.
+ (CookieCollection)
+ Add the elements of the specified WebSocketSharp.Net.CookieCollection to the current WebSocketSharp.Net.CookieCollection. +
@@ -358,7 +374,10 @@ CopyTo - (Array, int)
Documentation for this section has not yet been entered.
+ (Array, int)
+ Copies the elements of the WebSocketSharp.Net.CookieCollection to the specified Array, + starting at the specified index in the array. +
@@ -368,7 +387,10 @@ CopyTo - (Cookie[], int)
Documentation for this section has not yet been entered.
+ (Cookie[], int)
+ Copies the elements of the WebSocketSharp.Net.CookieCollection to the specified array of WebSocketSharp.Net.Cookie, + starting at the specified index in the array. +
@@ -378,7 +400,9 @@ GetEnumerator - () : IEnumerator
Documentation for this section has not yet been entered.
+ () : IEnumerator
+ Gets the enumerator to use to iterate through the WebSocketSharp.Net.CookieCollection. +
@@ -421,8 +445,8 @@

CookieCollection Constructor

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

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

Syntax

public CookieCollection ()

Remarks

@@ -437,8 +461,8 @@

Add Method

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

+ Add the specified WebSocketSharp.Net.Cookie to the WebSocketSharp.Net.CookieCollection. +

Syntax

public void Add (Cookie cookie)

Parameters

@@ -448,10 +472,27 @@ cookie
- Documentation for this section has not yet been entered. -
+ A WebSocketSharp.Net.Cookie to add to the WebSocketSharp.Net.CookieCollection. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ArgumentNullException + + cookie is null. +
+

Remarks

Documentation for this section has not yet been entered. @@ -464,8 +505,8 @@

Add Method

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

+ Add the elements of the specified WebSocketSharp.Net.CookieCollection to the current WebSocketSharp.Net.CookieCollection. +

Syntax

public void Add (CookieCollection cookies)

Parameters

@@ -475,10 +516,27 @@ cookies
- Documentation for this section has not yet been entered. -
+ A WebSocketSharp.Net.CookieCollection to add to the current WebSocketSharp.Net.CookieCollection. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ArgumentNullException + + cookies is null. +
+

Remarks

Documentation for this section has not yet been entered. @@ -491,8 +549,9 @@

CopyTo Method

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

+ Copies the elements of the WebSocketSharp.Net.CookieCollection to the specified Array, + starting at the specified index in the array. +

Syntax

public void CopyTo (Array array, int index)

Parameters

@@ -502,16 +561,41 @@ array
- Documentation for this section has not yet been entered. -
+ An Array that is the destination of the elements copied from the WebSocketSharp.Net.CookieCollection. +
index
- Documentation for this section has not yet been entered. -
+ An int that indicates the zero-based index in array at which copying begins. +
+

Exceptions

+
+ + + + + + + + + + + + + +
TypeReason
+ ArgumentNullException + + array is null. +
+ ArgumentOutOfRangeException + + index is less than zero. +
+

Remarks

Documentation for this section has not yet been entered. @@ -524,8 +608,9 @@

CopyTo Method

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

+ Copies the elements of the WebSocketSharp.Net.CookieCollection to the specified array of WebSocketSharp.Net.Cookie, + starting at the specified index in the array. +

Syntax

public void CopyTo (Cookie[] array, int index)

Parameters

@@ -535,16 +620,41 @@ array
- Documentation for this section has not yet been entered. -
+ An array of WebSocketSharp.Net.Cookie that is the destination of the elements copied from the WebSocketSharp.Net.CookieCollection. +
index
- Documentation for this section has not yet been entered. -
+ An int that indicates the zero-based index in array at which copying begins. +
+

Exceptions

+
+ + + + + + + + + + + + + +
TypeReason
+ ArgumentNullException + + array is null. +
+ ArgumentOutOfRangeException + + index is less than zero. +
+

Remarks

Documentation for this section has not yet been entered. @@ -557,14 +667,14 @@

Count Property

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

+ Gets the number of cookies contained in the WebSocketSharp.Net.CookieCollection. +

Syntax

public int Count { get; }

Value

- Documentation for this section has not yet been entered. -
+ An int that indicates the number of cookies contained in the WebSocketSharp.Net.CookieCollection. +

Remarks

Documentation for this section has not yet been entered. @@ -577,14 +687,15 @@

GetEnumerator Method

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

+ Gets the enumerator to use to iterate through the WebSocketSharp.Net.CookieCollection. +

Syntax

public IEnumerator GetEnumerator ()

Returns

- Documentation for this section has not yet been entered. -
+ An instance of an implementation of the IEnumerator interface + to use to iterate through the WebSocketSharp.Net.CookieCollection. +

Remarks

Documentation for this section has not yet been entered. @@ -597,14 +708,15 @@

IsReadOnly Property

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

+ Gets a value indicating whether the WebSocketSharp.Net.CookieCollection is read-only. +

Syntax

public bool IsReadOnly { get; }

Value

- Documentation for this section has not yet been entered. -
+ true if the WebSocketSharp.Net.CookieCollection is read-only; otherwise, false. + The default is true. +

Remarks

Documentation for this section has not yet been entered. @@ -617,14 +729,15 @@

IsSynchronized Property

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

+ Gets a value indicating whether access to the WebSocketSharp.Net.CookieCollection is thread safe. +

Syntax

public bool IsSynchronized { get; }

Value

- Documentation for this section has not yet been entered. -
+ true if access to the WebSocketSharp.Net.CookieCollection is thread safe; otherwise, false. + The default is false. +

Remarks

Documentation for this section has not yet been entered. @@ -637,8 +750,8 @@

Item Property

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

+ Gets the WebSocketSharp.Net.Cookie with the specified index from the WebSocketSharp.Net.CookieCollection. +

Syntax

@@ -651,13 +764,31 @@ index

- Documentation for this section has not yet been entered. -
+ An int that is the zero-based index of the WebSocketSharp.Net.Cookie to find. +

Value

- Documentation for this section has not yet been entered. + A WebSocketSharp.Net.Cookie with the specified index in the WebSocketSharp.Net.CookieCollection. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ArgumentOutOfRangeException + + index is less than zero or index is greater than or + equal to CookieCollection.Count. +

Remarks

@@ -671,8 +802,8 @@

Item Property

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

+ Gets the WebSocketSharp.Net.Cookie with the specified name from the WebSocketSharp.Net.CookieCollection. +

Syntax

@@ -685,13 +816,30 @@ name

- Documentation for this section has not yet been entered. -
+ A string that is the name of the WebSocketSharp.Net.Cookie to find. +

Value

- Documentation for this section has not yet been entered. + A WebSocketSharp.Net.Cookie with the specified name in the WebSocketSharp.Net.CookieCollection. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ArgumentNullException + + name is null. +

Remarks

@@ -705,14 +853,14 @@

SyncRoot Property

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

+ Gets an object to use to synchronize access to the WebSocketSharp.Net.CookieCollection. +

Syntax

public object SyncRoot { get; }

Value

- Documentation for this section has not yet been entered. -
+ An object to use to synchronize access to the WebSocketSharp.Net.CookieCollection. +

Remarks

Documentation for this section has not yet been entered. diff --git a/websocket-sharp/doc/html/WebSocketSharp.Net/CookieException.html b/websocket-sharp/doc/html/WebSocketSharp.Net/CookieException.html index 24ecda71..e4dc996c 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Net/CookieException.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Net/CookieException.html @@ -207,8 +207,8 @@

CookieException Class

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

+ The exception that is thrown when a WebSocketSharp.Net.Cookie gets an error. +

Syntax

public class CookieException : FormatException
@@ -243,8 +243,8 @@ ()
- Documentation for this section has not yet been entered. - + Initializes a new instance of the WebSocketSharp.Net.CookieException class. +
@@ -265,8 +265,9 @@ (System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
- Documentation for this section has not yet been entered. - + Initializes a new instance of the WebSocketSharp.Net.CookieException class + with the specified System.Runtime.Serialization.SerializationInfo and System.Runtime.Serialization.StreamingContext. +
@@ -282,7 +283,9 @@ GetObjectData - (System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
Documentation for this section has not yet been entered.
+ (System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
+ Populates the specified System.Runtime.Serialization.SerializationInfo with the data needed to serialize the WebSocketSharp.Net.CookieException. +
@@ -302,8 +305,8 @@ - Documentation for this section has not yet been entered. - + Populates the specified System.Runtime.Serialization.SerializationInfo with the data needed to serialize the WebSocketSharp.Net.CookieException. +
@@ -346,8 +349,8 @@

CookieException Constructor

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

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

Syntax

public CookieException ()

Remarks

@@ -362,25 +365,26 @@

CookieException Constructor

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

+ Initializes a new instance of the WebSocketSharp.Net.CookieException class + with the specified System.Runtime.Serialization.SerializationInfo and System.Runtime.Serialization.StreamingContext. +

Syntax

- +
protected CookieException (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext)

Parameters

- info + serializationInfo
- Documentation for this section has not yet been entered. -
+ A System.Runtime.Serialization.SerializationInfo that holds the serialized object data. +
- context + streamingContext
- Documentation for this section has not yet been entered. -
+ A System.Runtime.Serialization.StreamingContext that contains the contextual information about the source or destination. +

Remarks

@@ -395,8 +399,8 @@

GetObjectData Method

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

+ Populates the specified System.Runtime.Serialization.SerializationInfo with the data needed to serialize the WebSocketSharp.Net.CookieException. +

Syntax

public override void GetObjectData (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext)

Parameters

@@ -406,14 +410,14 @@ serializationInfo
- Documentation for this section has not yet been entered. -
+ A System.Runtime.Serialization.SerializationInfo that holds the serialized object data. +
streamingContext
- Documentation for this section has not yet been entered. -
+ A System.Runtime.Serialization.StreamingContext that specifies the destination for the serialization. +

Remarks

@@ -428,26 +432,26 @@

System.Runtime.Serialization.ISerializable.GetObjectData Method

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

+ Populates the specified System.Runtime.Serialization.SerializationInfo with the data needed to serialize the WebSocketSharp.Net.CookieException. +

Syntax

- void System.Runtime.Serialization.ISerializable.GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
+ void System.Runtime.Serialization.ISerializable.GetObjectData (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext)

Parameters

- info + serializationInfo
- Documentation for this section has not yet been entered. -
+ A System.Runtime.Serialization.SerializationInfo that holds the serialized object data. +
- context + streamingContext
- Documentation for this section has not yet been entered. -
+ A System.Runtime.Serialization.StreamingContext that specifies the destination for the serialization. +

Remarks

diff --git a/websocket-sharp/doc/html/WebSocketSharp.Net/HttpListenerRequest.html b/websocket-sharp/doc/html/WebSocketSharp.Net/HttpListenerRequest.html index a2690457..44d1a2ab 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Net/HttpListenerRequest.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Net/HttpListenerRequest.html @@ -207,7 +207,7 @@

HttpListenerRequest Class

- Provides access to the HTTP request objects sent to a WebSocketSharp.Net.HttpListener instance. + Provides access to a request to a WebSocketSharp.Net.HttpListener instance.

Syntax

@@ -806,7 +806,7 @@
public System.Text.Encoding ContentEncoding { get; }

Value

- A System.Text.Encoding that contains the encoding that can be used with entity body data. + A System.Text.Encoding that contains the encoding that can be used with the entity body data.

Remarks

@@ -827,7 +827,7 @@

Value

A long that contains the value of the Content-Length entity-header field. - -1 if the size is not known. + The value is a number of bytes in the entity body data. -1 if the size is not known.

Remarks

diff --git a/websocket-sharp/doc/html/WebSocketSharp.Net/HttpListenerResponse.html b/websocket-sharp/doc/html/WebSocketSharp.Net/HttpListenerResponse.html index 6b915a65..96f0ed7b 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Net/HttpListenerResponse.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Net/HttpListenerResponse.html @@ -207,8 +207,8 @@

HttpListenerResponse Class

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

+ Provides access to a response to a request being processed by a WebSocketSharp.Net.HttpListener instance. +

Syntax

public sealed class HttpListenerResponse : IDisposable
@@ -216,8 +216,8 @@

Remarks

- Documentation for this section has not yet been entered. -
+ The HttpListenerResponse class cannot be inherited. +

Requirements

Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
@@ -244,7 +244,9 @@ System.Text.Encoding - . Documentation for this section has not yet been entered. + . + Gets or sets the encoding that can be used with the entity body data included in the response. + @@ -259,7 +261,9 @@ long - . Documentation for this section has not yet been entered. + . + Gets or sets the size of the entity body data included in the response. + @@ -274,7 +278,9 @@ string - . Documentation for this section has not yet been entered. + . + Gets or sets the media type of the entity body included in the response. + @@ -289,7 +295,9 @@ CookieCollection - . Documentation for this section has not yet been entered. + . + Gets or sets the cookies returned with the response. + @@ -304,7 +312,9 @@ WebHeaderCollection - . Documentation for this section has not yet been entered. + . + Gets or sets the HTTP headers returned to the client. + @@ -319,7 +329,9 @@ bool - . Documentation for this section has not yet been entered. + . + Gets or sets a value indicating whether the server requests a persistent connection. + [read-only]
@@ -331,7 +343,9 @@ System.IO.Stream - . Documentation for this section has not yet been entered. + . + Gets a System.IO.Stream to use to write the entity body data. + @@ -346,7 +360,9 @@ Version - . Documentation for this section has not yet been entered. + . + Gets or sets the HTTP version used in the response. + @@ -361,7 +377,9 @@ string - . Documentation for this section has not yet been entered. + . + Gets or sets the URL to which the client is redirected to locate a requested resource. + @@ -376,7 +394,9 @@ bool - . Documentation for this section has not yet been entered. + . + Gets or sets a value indicating whether the response uses the chunked transfer encoding. + @@ -391,7 +411,9 @@ int - . Documentation for this section has not yet been entered. + . + Gets or sets the HTTP status code returned to the client. + @@ -406,7 +428,9 @@ string - . Documentation for this section has not yet been entered. + . + Gets or sets a description of the HTTP status code returned to the client. +
@@ -423,7 +447,9 @@ Abort - ()
Documentation for this section has not yet been entered.
+ ()
+ Closes the connection to the client without sending a response. +
@@ -433,7 +459,10 @@ AddHeader - (string, string)
Documentation for this section has not yet been entered.
+ (string, string)
+ Adds the specified HTTP header name and value to + the headers for this response. +
@@ -443,7 +472,9 @@ AppendCookie - (Cookie)
Documentation for this section has not yet been entered.
+ (Cookie)
+ Adds the specified WebSocketSharp.Net.Cookie to the HttpListenerResponse.Cookies sent with the response. +
@@ -453,7 +484,9 @@ AppendHeader - (string, string)
Documentation for this section has not yet been entered.
+ (string, string)
+ Appends a value to the specified HTTP header sent with the response. +
@@ -463,7 +496,10 @@ Close - ()
Documentation for this section has not yet been entered.
+ ()
+ Sends the response to the client and releases the resources associated with + the WebSocketSharp.Net.HttpListenerResponse instance. +
@@ -473,7 +509,10 @@ Close - (byte[], bool)
Documentation for this section has not yet been entered.
+ (byte[], bool)
+ Sends the response with the specified array of byte to the client and + releases the resources associated with the WebSocketSharp.Net.HttpListenerResponse instance. +
@@ -483,7 +522,9 @@ CopyFrom - (HttpListenerResponse)
Documentation for this section has not yet been entered.
+ (HttpListenerResponse)
+ Copies properties from the specified WebSocketSharp.Net.HttpListenerResponse to this response. +
@@ -493,7 +534,9 @@ Redirect - (string)
Documentation for this section has not yet been entered.
+ (string)
+ Configures the response to redirect the client's request to the specified url. +
@@ -503,7 +546,9 @@ SetCookie - (Cookie)
Documentation for this section has not yet been entered.
+ (Cookie)
+ Adds or updates a WebSocketSharp.Net.Cookie in the HttpListenerResponse.Cookies sent with the response. +
@@ -523,8 +568,8 @@ - Documentation for this section has not yet been entered. - + Releases all resource used by the WebSocketSharp.Net.HttpListenerResponse. +
@@ -578,8 +623,8 @@

Abort Method

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

+ Closes the connection to the client without sending a response. +

Syntax

public void Abort ()

Remarks

@@ -594,8 +639,9 @@

AddHeader Method

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

+ Adds the specified HTTP header name and value to + the headers for this response. +

Syntax

public void AddHeader (string name, string value)

Parameters

@@ -605,16 +651,41 @@ name
- Documentation for this section has not yet been entered. -
+ A string that contains the name of the HTTP header to add. +
value
- Documentation for this section has not yet been entered. -
+ A string that contains the value of the HTTP header to add. +
+

Exceptions

+
+ + + + + + + + + + + + + +
TypeReason
+ ArgumentNullException + + name is null or string.Empty. +
+ ArgumentOutOfRangeException + + The length of value is greater than 65,535 characters. +
+

Remarks

Documentation for this section has not yet been entered. @@ -627,8 +698,8 @@

AppendCookie Method

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

+ Adds the specified WebSocketSharp.Net.Cookie to the HttpListenerResponse.Cookies sent with the response. +

Syntax

public void AppendCookie (Cookie cookie)

Parameters

@@ -638,10 +709,27 @@ cookie
- Documentation for this section has not yet been entered. -
+ A WebSocketSharp.Net.Cookie to add to the HttpListenerResponse.Cookies. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ArgumentNullException + + cookie is null. +
+

Remarks

Documentation for this section has not yet been entered. @@ -654,8 +742,8 @@

AppendHeader Method

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

+ Appends a value to the specified HTTP header sent with the response. +

Syntax

public void AppendHeader (string name, string value)

Parameters

@@ -665,16 +753,41 @@ name
- Documentation for this section has not yet been entered. -
+ A string that contains the name of the HTTP header to append value to. +
value
- Documentation for this section has not yet been entered. -
+ A string that contains the value to append to the HTTP header. +
+

Exceptions

+
+ + + + + + + + + + + + + +
TypeReason
+ ArgumentException + + name is null or string.Empty. +
+ ArgumentOutOfRangeException + + The length of value is greater than 65,535 characters. +
+

Remarks

Documentation for this section has not yet been entered. @@ -687,8 +800,9 @@

Close Method

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

+ Sends the response to the client and releases the resources associated with + the WebSocketSharp.Net.HttpListenerResponse instance. +

Syntax

public void Close ()

Remarks

@@ -703,8 +817,9 @@

Close Method

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

+ Sends the response with the specified array of byte to the client and + releases the resources associated with the WebSocketSharp.Net.HttpListenerResponse instance. +

Syntax

public void Close (byte[] responseEntity, bool willBlock)

Parameters

@@ -714,16 +829,41 @@ responseEntity
- Documentation for this section has not yet been entered. -
+ An array of byte that contains the response entity body data. +
willBlock
- Documentation for this section has not yet been entered. -
+ true if this method blocks execution while flushing the stream to the client; otherwise, false. +
+

Exceptions

+
+ + + + + + + + + + + + + +
TypeReason
+ ArgumentNullException + + responseEntity is null. +
+ ObjectDisposedException + + This object is closed. +
+

Remarks

Documentation for this section has not yet been entered. @@ -736,13 +876,38 @@

ContentEncoding Property

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

+ Gets or sets the encoding that can be used with the entity body data included in the response. +

Syntax

public System.Text.Encoding ContentEncoding { get; set; }

Value

- Documentation for this section has not yet been entered. + A System.Text.Encoding that contains the encoding that can be used with the entity body data. +
+

Exceptions

+
+ + + + + + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object is closed. +
+ InvalidOperationException + + The response has been sent already. +

Remarks

@@ -756,13 +921,47 @@

ContentLength64 Property

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

+ Gets or sets the size of the entity body data included in the response. +

Syntax

public long ContentLength64 { get; set; }

Value

- Documentation for this section has not yet been entered. + A long that contains the value of the Content-Length entity-header field. + The value is a number of bytes in the entity body data. +
+

Exceptions

+
+ + + + + + + + + + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object is closed. +
+ InvalidOperationException + + The response has been sent already. +
+ ArgumentOutOfRangeException + + The value specified for a set operation is less than zero. +

Remarks

@@ -776,13 +975,55 @@

ContentType Property

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

+ Gets or sets the media type of the entity body included in the response. +

Syntax

public string ContentType { get; set; }

Value

- Documentation for this section has not yet been entered. + The type of the content. + A string that contains the value of the Content-Type entity-header field. +
+

Exceptions

+
+ + + + + + + + + + + + + + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object is closed. +
+ InvalidOperationException + + The response has been sent already. +
+ ArgumentNullException + + The value specified for a set operation is null. +
+ ArgumentException + + The value specified for a set operation is a string.Empty. +

Remarks

@@ -796,14 +1037,14 @@

Cookies Property

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

+ Gets or sets the cookies returned with the response. +

Syntax

public CookieCollection Cookies { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ A WebSocketSharp.Net.CookieCollection that contains the cookies returned with the response. +

Remarks

Documentation for this section has not yet been entered. @@ -816,8 +1057,8 @@

CopyFrom Method

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

+ Copies properties from the specified WebSocketSharp.Net.HttpListenerResponse to this response. +

Syntax

public void CopyFrom (HttpListenerResponse templateResponse)

Parameters

@@ -827,8 +1068,8 @@ templateResponse
- Documentation for this section has not yet been entered. -
+ A WebSocketSharp.Net.HttpListenerResponse to copy. +

Remarks

@@ -843,14 +1084,14 @@

Headers Property

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

+ Gets or sets the HTTP headers returned to the client. +

Syntax

public WebHeaderCollection Headers { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ A WebSocketSharp.Net.WebHeaderCollection that contains the HTTP headers returned to the client. +

Remarks

Documentation for this section has not yet been entered. @@ -863,13 +1104,39 @@

KeepAlive Property

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

+ Gets or sets a value indicating whether the server requests a persistent connection. +

Syntax

public bool KeepAlive { get; set; }

Value

- Documentation for this section has not yet been entered. + true if the server requests a persistent connection; otherwise, false. + The default is true. +
+

Exceptions

+
+ + + + + + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object is closed. +
+ InvalidOperationException + + The response has been sent already. +

Remarks

@@ -883,13 +1150,30 @@

OutputStream Property

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

+ Gets a System.IO.Stream to use to write the entity body data. +

Syntax

public System.IO.Stream OutputStream { get; }

Value

- Documentation for this section has not yet been entered. + A System.IO.Stream to use to write the entity body data. +
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object is closed. +

Remarks

@@ -903,13 +1187,55 @@

ProtocolVersion Property

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

+ Gets or sets the HTTP version used in the response. +

Syntax

public Version ProtocolVersion { get; set; }

Value

- Documentation for this section has not yet been entered. + A Version that contains the HTTP version used in the response. +
+

Exceptions

+
+ + + + + + + + + + + + + + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object is closed. +
+ InvalidOperationException + + The response has been sent already. +
+ ArgumentNullException + + The value specified for a set operation is null. +
+ ArgumentException + + The value specified for a set operation does not have its Version.Major property set to 1 or + does not have its Version.Minor property set to either 0 or 1. +

Remarks

@@ -923,8 +1249,8 @@

Redirect Method

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

+ Configures the response to redirect the client's request to the specified url. +

Syntax

public void Redirect (string url)

Parameters

@@ -934,8 +1260,8 @@ url
- Documentation for this section has not yet been entered. -
+ A string that contains a URL to redirect the client's request to. +

Remarks

@@ -950,13 +1276,46 @@

RedirectLocation Property

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

+ Gets or sets the URL to which the client is redirected to locate a requested resource. +

Syntax

public string RedirectLocation { get; set; }

Value

- Documentation for this section has not yet been entered. + A string that contains the value of the Location response-header field. +
+

Exceptions

+
+ + + + + + + + + + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object is closed. +
+ InvalidOperationException + + The response has been sent already. +
+ ArgumentException + + The value specified for a set operation is a string.Empty. +

Remarks

@@ -970,13 +1329,38 @@

SendChunked Property

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

+ Gets or sets a value indicating whether the response uses the chunked transfer encoding. +

Syntax

public bool SendChunked { get; set; }

Value

- Documentation for this section has not yet been entered. + true if the response uses the chunked transfer encoding; otherwise, false. +
+

Exceptions

+
+ + + + + + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object is closed. +
+ InvalidOperationException + + The response has been sent already. +

Remarks

@@ -990,8 +1374,8 @@

SetCookie Method

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

+ Adds or updates a WebSocketSharp.Net.Cookie in the HttpListenerResponse.Cookies sent with the response. +

Syntax

public void SetCookie (Cookie cookie)

Parameters

@@ -1001,10 +1385,36 @@ cookie
- Documentation for this section has not yet been entered. -
+ A WebSocketSharp.Net.Cookie to set. +
+

Exceptions

+
+ + + + + + + + + + + + + +
TypeReason
+ ArgumentNullException + + cookie is null. +
+ ArgumentException + + cookie already exists in the HttpListenerResponse.Cookies and + could not be replaced. +
+

Remarks

Documentation for this section has not yet been entered. @@ -1017,13 +1427,47 @@

StatusCode Property

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

+ Gets or sets the HTTP status code returned to the client. +

Syntax

public int StatusCode { get; set; }

Value

- Documentation for this section has not yet been entered. + An int that indicates the HTTP status code for the response to the request. + The default is HttpStatusCode.OK. +
+

Exceptions

+
+ + + + + + + + + + + + + + + + + +
TypeReason
+ ObjectDisposedException + + This object is closed. +
+ InvalidOperationException + + The response has been sent already. +
+ System.Net.ProtocolViolationException + + The value specified for a set operation is invalid. Valid values are between 100 and 999. +

Remarks

@@ -1037,14 +1481,14 @@

StatusDescription Property

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

+ Gets or sets a description of the HTTP status code returned to the client. +

Syntax

public string StatusDescription { get; set; }

Value

- Documentation for this section has not yet been entered. -
+ A string that contains a description of the HTTP status code returned to the client. +

Remarks

Documentation for this section has not yet been entered. @@ -1057,8 +1501,8 @@

System.IDisposable.Dispose Method

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

+ Releases all resource used by the WebSocketSharp.Net.HttpListenerResponse. +

Syntax

void System.IDisposable.Dispose ()
diff --git a/websocket-sharp/doc/html/WebSocketSharp.Net/index.html b/websocket-sharp/doc/html/WebSocketSharp.Net/index.html index b7aa585c..9575703a 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Net/index.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Net/index.html @@ -223,24 +223,24 @@ Cookie - Documentation for this section has not yet been entered. - + Provides a set of properties and methods to use to manage the HTTP Cookie. + CookieCollection - Documentation for this section has not yet been entered. - + Provides a collection container for instances of the WebSocketSharp.Net.Cookie class. + CookieException - Documentation for this section has not yet been entered. - + The exception that is thrown when a WebSocketSharp.Net.Cookie gets an error. + @@ -279,7 +279,7 @@ HttpListenerRequest - Provides access to the HTTP request objects sent to a WebSocketSharp.Net.HttpListener instance. + Provides access to a request to a WebSocketSharp.Net.HttpListener instance. @@ -287,8 +287,8 @@ HttpListenerResponse - Documentation for this section has not yet been entered. - + Provides access to a response to a request being processed by a WebSocketSharp.Net.HttpListener instance. + diff --git a/websocket-sharp/doc/html/WebSocketSharp.Server/HttpRequestEventArgs.html b/websocket-sharp/doc/html/WebSocketSharp.Server/HttpRequestEventArgs.html index f79b47d8..a108786c 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Server/HttpRequestEventArgs.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Server/HttpRequestEventArgs.html @@ -217,8 +217,8 @@

Remarks

An HTTP request 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. + If you want to get the HTTP request objects, you should access the HttpRequestEventArgs.Request property. + If you want to get the HTTP response objects to send, you should access the HttpRequestEventArgs.Response property.

Requirements

diff --git a/websocket-sharp/doc/html/WebSocketSharp/CloseEventArgs.html b/websocket-sharp/doc/html/WebSocketSharp/CloseEventArgs.html index 1d1222ef..08d5d004 100644 --- a/websocket-sharp/doc/html/WebSocketSharp/CloseEventArgs.html +++ b/websocket-sharp/doc/html/WebSocketSharp/CloseEventArgs.html @@ -217,8 +217,8 @@

Remarks

The WebSocket.OnClose event occurs when the WebSocket receives a close control frame or - the WebSocket.Close method is called. If you want to get the reason for closure, you should access the CloseEventArgs.Code or - CloseEventArgs.Reason properties. + the WebSocket.Close method is called. If you want to get the reason for closure, you should access + the CloseEventArgs.Code or CloseEventArgs.Reason properties.

Requirements

@@ -299,7 +299,7 @@ Opcode . - Gets the type of received data. + Gets the type of the received data. (Inherited from MessageEventArgs.) @@ -313,7 +313,7 @@ bool . - Indicates whether the connection closed cleanly or not. + Indicates whether the WebSocket connection closed cleanly. @@ -397,13 +397,13 @@

WasClean Property

- Indicates whether the connection closed cleanly or not. + Indicates whether the WebSocket connection closed cleanly.

Syntax

public bool WasClean { get; }

Value

- true if the connection closed cleanly; otherwise, false. + true if the WebSocket connection closed cleanly; otherwise, false.

Remarks

diff --git a/websocket-sharp/doc/html/WebSocketSharp/Ext.html b/websocket-sharp/doc/html/WebSocketSharp/Ext.html index 895fe25f..58cadb53 100644 --- a/websocket-sharp/doc/html/WebSocketSharp/Ext.html +++ b/websocket-sharp/doc/html/WebSocketSharp/Ext.html @@ -251,6 +251,18 @@ AcceptWebSocketAsync (this System.Net.Sockets.TcpListener, bool, Action<WebSocketSharp.Net.WebSockets.TcpListenerWebSocketContext>)
Accepts a WebSocket connection asynchronously by the System.Net.Sockets.TcpListener. +
+ + + +
static
+ + + + Contains + (this string, params char[]) : bool
+ Determines whether the specified string contains any of characters + in the specified array of char.
@@ -384,6 +396,17 @@ IsEmpty (this string) : bool
Determines whether the specified string is a string.Empty. +
+ + + +
static
+ + + + IsEnclosedIn + (this string, char) : bool
+ Determines whether the specified string is enclosed in the specified char.
@@ -848,6 +871,44 @@ Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)

+

Contains Method

+
+

+ Determines whether the specified string contains any of characters + in the specified array of char. +

+

Syntax

+
public static bool Contains (this string str, params char[] chars)
+

Parameters

+
+
+
+ str +
+
+ A string to test. +
+
+ chars +
+
+ An array of char that contains characters to find. +
+
+
+

Returns

+
+ true if str contains any of chars; otherwise, false. +
+

Remarks

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

Requirements

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

Emit Method

@@ -1302,7 +1363,7 @@

Returns

- true if the value parameter is a string.Empty; otherwise, false. + true if value is string.Empty; otherwise, false.

Remarks

@@ -1313,6 +1374,43 @@ Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)

+

IsEnclosedIn Method

+
+

+ Determines whether the specified string is enclosed in the specified char. +

+

Syntax

+
public static bool IsEnclosedIn (this string str, char c)
+

Parameters

+
+
+
+ str +
+
+ A string to test. +
+
+ c +
+
+ A char that contains character to find. +
+
+
+

Returns

+
+ true if str is enclosed in c; otherwise, false. +
+

Remarks

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

Requirements

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

IsHostOrder Method

diff --git a/websocket-sharp/doc/html/WebSocketSharp/MessageEventArgs.html b/websocket-sharp/doc/html/WebSocketSharp/MessageEventArgs.html index 082585a3..727bb9f1 100644 --- a/websocket-sharp/doc/html/WebSocketSharp/MessageEventArgs.html +++ b/websocket-sharp/doc/html/WebSocketSharp/MessageEventArgs.html @@ -271,7 +271,7 @@ Opcode . - Gets the type of received data. + Gets the type of the received data. @@ -321,7 +321,7 @@

public string Data { get; }

Value

- A string that contains a received data. + A string that contains the received data.

Remarks

@@ -341,7 +341,7 @@
public byte[] RawData { get; }

Value

- An array of byte that contains a received data. + An array of byte that contains the received data.

Remarks

@@ -355,13 +355,13 @@

Type Property

- Gets the type of received data. + Gets the type of the received data.

Syntax

public Opcode Type { get; }

Value

- One of the Frame.Opcode that indicates the type of received data. + One of the WebSocketSharp.Opcode values that indicates the type of the received data.

Remarks

diff --git a/websocket-sharp/doc/html/index.html b/websocket-sharp/doc/html/index.html index b484e43f..000d2b33 100644 --- a/websocket-sharp/doc/html/index.html +++ b/websocket-sharp/doc/html/index.html @@ -315,24 +315,24 @@ Cookie - Documentation for this section has not yet been entered. - + Provides a set of properties and methods to use to manage the HTTP Cookie. + CookieCollection - Documentation for this section has not yet been entered. - + Provides a collection container for instances of the WebSocketSharp.Net.Cookie class. + CookieException - Documentation for this section has not yet been entered. - + The exception that is thrown when a WebSocketSharp.Net.Cookie gets an error. + @@ -371,7 +371,7 @@ HttpListenerRequest - Provides access to the HTTP request objects sent to a WebSocketSharp.Net.HttpListener instance. + Provides access to a request to a WebSocketSharp.Net.HttpListener instance. @@ -379,8 +379,8 @@ HttpListenerResponse - Documentation for this section has not yet been entered. - + Provides access to a response to a request being processed by a WebSocketSharp.Net.HttpListener instance. + diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/Cookie.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/Cookie.xml index e49bdcf0..a5a5b427 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/Cookie.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/Cookie.xml @@ -9,8 +9,12 @@ - To be added. - To be added. + + Provides a set of properties and methods to use to manage the HTTP Cookie. + + + The Cookie class cannot be inherited. + @@ -19,7 +23,9 @@ Constructor - To be added. + + Initializes a new instance of the class. + To be added. @@ -32,10 +38,41 @@ - To be added. - To be added. - To be added. + + A that contains the Name of the cookie. + + + A that contains the Value of the cookie. + + + Initializes a new instance of the class + with the specified and . + To be added. + + + is or . + + + - or - + + + contains an invalid character. + + + - or - + + + is . + + + - or - + + + contains a string not enclosed in double quotes + that contains an invalid character. + + @@ -48,11 +85,44 @@ - To be added. - To be added. - To be added. - To be added. + + A that contains the Name of the cookie. + + + A that contains the Value of the cookie. + + + A that contains the value of the Path attribute of the cookie. + + + Initializes a new instance of the class + with the specified , and . + To be added. + + + is or . + + + - or - + + + contains an invalid character. + + + - or - + + + is . + + + - or - + + + contains a string not enclosed in double quotes + that contains an invalid character. + + @@ -66,12 +136,48 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + + A that contains the Name of the cookie. + + + A that contains the Value of the cookie. + + + A that contains the value of the Path attribute of the cookie. + + + A that contains the value of the Domain attribute of the cookie. + + + Initializes a new instance of the class + with the specified , , + and . + To be added. + + + is or . + + + - or - + + + contains an invalid character. + + + - or - + + + is . + + + - or - + + + contains a string not enclosed in double quotes + that contains an invalid character. + + @@ -82,8 +188,12 @@ System.String - To be added. - To be added. + + Gets or sets the value of the Comment attribute of the cookie. + + + A that contains a comment to document intended use of the cookie. + To be added. @@ -95,8 +205,13 @@ System.Uri - To be added. - To be added. + + Gets or sets the value of the CommentURL attribute of the cookie. + + + A that contains a URI that provides the comment + to document intended use of the cookie. + To be added. @@ -108,8 +223,14 @@ System.Boolean - To be added. - To be added. + + Gets or sets a value indicating whether the client discards the cookie unconditionally + when the client terminates. + + + true if the client discards the cookie unconditionally when the client terminates; + otherwise, false. The default is false. + To be added. @@ -121,25 +242,36 @@ System.String - To be added. - To be added. + + Gets or sets the value of the Domain attribute of the cookie. + + + A that contains a URI for which the cookie is valid. + To be added. - - + + Method System.Boolean - + - To be added. - To be added. - To be added. + + An to compare with the current . + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; + otherwise, false. + To be added. @@ -151,8 +283,12 @@ System.Boolean - To be added. - To be added. + + Gets or sets a value indicating whether the cookie has expired. + + + true if the cookie has expired; otherwise, false. + To be added. @@ -164,8 +300,12 @@ System.DateTime - To be added. - To be added. + + Gets or sets the value of the Expires attribute of the cookie. + + + A that contains the date and time at which the cookie expires. + To be added. @@ -178,8 +318,12 @@ - To be added. - To be added. + + Serves as a hash function for a object. + + + An that contains a hash code for this instance. + To be added. @@ -191,8 +335,12 @@ System.Boolean - To be added. - To be added. + + Gets or sets a value indicating non-HTTP APIs can access the cookie. + + + true if non-HTTP APIs can not access the cookie; otherwise, false. + To be added. @@ -204,9 +352,24 @@ System.String - To be added. - To be added. + + Gets or sets the Name of the cookie. + + + A that contains the Name of the cookie. + To be added. + + + The value specified for a set operation is or . + + + - or - + + + The value specified for a set operation contains an invalid character. + + @@ -217,8 +380,13 @@ System.String - To be added. - To be added. + + Gets or sets the value of the Path attribute of the cookie. + + + A that contains a subset of URI on the origin server + to which the cookie applies. + To be added. @@ -230,9 +398,16 @@ System.String - To be added. - To be added. + + Gets or sets the value of the Port attribute of the cookie. + + + A that contains a list of the TCP ports to which the cookie applies. + To be added. + + The value specified for a set operation could not be parsed or is not enclosed in double quotes. + @@ -243,9 +418,17 @@ System.Boolean - To be added. - To be added. - To be added. + + Gets or sets a value indicating whether the security level of the cookie is secure. + + + true if the security level of the cookie is secure; otherwise, false. + The default is false. + + + When this property is true, the cookie may be included in the HTTP request + only if the request is transmitted over the HTTPS. + @@ -256,8 +439,12 @@ System.DateTime - To be added. - To be added. + + Gets the time when the cookie was issued. + + + A that contains the time when the cookie was issued. + To be added. @@ -270,9 +457,15 @@ - To be added. - To be added. - To be added. + + Returns a that represents the current . + + + A that represents the current . + + + This method returns a to use to send an HTTP Cookie to an origin server. + @@ -283,8 +476,12 @@ System.String - To be added. - To be added. + + Gets or sets the Value of the cookie. + + + A that contains the Value of the cookie. + To be added. @@ -296,9 +493,17 @@ System.Int32 - To be added. - To be added. + + Gets or sets the value of the Version attribute of the cookie. + + + An that contains the version of the HTTP state management + to which the cookie conforms. + To be added. + + The value specified for a set operation is less than zero. + diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/CookieCollection.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/CookieCollection.xml index e100b817..543c0b63 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/CookieCollection.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/CookieCollection.xml @@ -13,7 +13,9 @@ - To be added. + + Provides a collection container for instances of the class. + To be added. @@ -23,7 +25,9 @@ Constructor - To be added. + + Initializes a new instance of the class. + To be added. @@ -38,9 +42,16 @@ - To be added. - To be added. + + A to add to the . + + + Add the specified to the . + To be added. + + is . + @@ -54,9 +65,16 @@ - To be added. - To be added. + + A to add to the current . + + + Add the elements of the specified to the current . + To be added. + + is . + @@ -71,10 +89,23 @@ - To be added. - To be added. - To be added. + + An that is the destination of the elements copied from the . + + + An that indicates the zero-based index in at which copying begins. + + + Copies the elements of the to the specified , + starting at the specified in the . + To be added. + + is . + + + is less than zero. + @@ -89,10 +120,23 @@ - To be added. - To be added. - To be added. + + An array of that is the destination of the elements copied from the . + + + An that indicates the zero-based index in at which copying begins. + + + Copies the elements of the to the specified array of , + starting at the specified in the . + To be added. + + is . + + + is less than zero. + @@ -103,8 +147,12 @@ System.Int32 - To be added. - To be added. + + Gets the number of cookies contained in the . + + + An that indicates the number of cookies contained in the . + To be added. @@ -117,8 +165,13 @@ - To be added. - To be added. + + Gets the enumerator to use to iterate through the . + + + An instance of an implementation of the interface + to use to iterate through the . + To be added. @@ -130,8 +183,13 @@ System.Boolean - To be added. - To be added. + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + The default is true. + To be added. @@ -143,8 +201,13 @@ System.Boolean - To be added. - To be added. + + Gets a value indicating whether access to the is thread safe. + + + true if access to the is thread safe; otherwise, false. + The default is false. + To be added. @@ -159,10 +222,20 @@ - To be added. - To be added. - To be added. + + An that is the zero-based index of the to find. + + + Gets the with the specified from the . + + + A with the specified in the . + To be added. + + is less than zero or is greater than or + equal to . + @@ -176,10 +249,19 @@ - To be added. - To be added. - To be added. + + A that is the name of the to find. + + + Gets the with the specified from the . + + + A with the specified in the . + To be added. + + is . + @@ -190,8 +272,12 @@ System.Object - To be added. - To be added. + + Gets an object to use to synchronize access to the . + + + An to use to synchronize access to the . + To be added. diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/CookieException.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/CookieException.xml index cc63c796..437d195e 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/CookieException.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/CookieException.xml @@ -9,7 +9,9 @@ - To be added. + + The exception that is thrown when a gets an error. + To be added. @@ -19,22 +21,31 @@ Constructor - To be added. + + Initializes a new instance of the class. + To be added. - - + + Constructor - - + + - To be added. - To be added. - To be added. + + A that holds the serialized object data. + + + A that contains the contextual information about the source or destination. + + + Initializes a new instance of the class + with the specified and . + To be added. @@ -50,27 +61,39 @@ - To be added. - To be added. - To be added. + + A that holds the serialized object data. + + + A that specifies the destination for the serialization. + + + Populates the specified with the data needed to serialize the . + To be added. - - + + Method System.Void - - + + - To be added. - To be added. - To be added. + + A that holds the serialized object data. + + + A that specifies the destination for the serialization. + + + Populates the specified with the data needed to serialize the . + To be added. diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpListenerRequest.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpListenerRequest.xml index d7d2897a..84735b31 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpListenerRequest.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpListenerRequest.xml @@ -10,7 +10,7 @@ - Provides access to the HTTP request objects sent to a instance. + Provides access to a request to a instance. The HttpListenerRequest class cannot be inherited. @@ -98,7 +98,7 @@ Gets the encoding that can be used with the entity body data included in the request. - A that contains the encoding that can be used with entity body data. + A that contains the encoding that can be used with the entity body data. To be added. @@ -116,7 +116,7 @@ A that contains the value of the Content-Length entity-header field. - -1 if the size is not known. + The value is a number of bytes in the entity body data. -1 if the size is not known. To be added. diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpListenerResponse.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpListenerResponse.xml index 0916c49b..5543f89c 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpListenerResponse.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Net/HttpListenerResponse.xml @@ -13,8 +13,12 @@ - To be added. - To be added. + + Provides access to a response to a request being processed by a instance. + + + The HttpListenerResponse class cannot be inherited. + @@ -26,7 +30,9 @@ - To be added. + + Closes the connection to the client without sending a response. + To be added. @@ -42,10 +48,23 @@ - To be added. - To be added. - To be added. + + A that contains the name of the HTTP header to add. + + + A that contains the value of the HTTP header to add. + + + Adds the specified HTTP header and to + the headers for this response. + To be added. + + is or . + + + The length of is greater than 65,535 characters. + @@ -59,9 +78,16 @@ - To be added. - To be added. + + A to add to the . + + + Adds the specified to the sent with the response. + To be added. + + is . + @@ -76,10 +102,22 @@ - To be added. - To be added. - To be added. + + A that contains the name of the HTTP header to append to. + + + A that contains the value to append to the HTTP header. + + + Appends a to the specified HTTP header sent with the response. + To be added. + + is or . + + + The length of is greater than 65,535 characters. + @@ -91,7 +129,10 @@ - To be added. + + Sends the response to the client and releases the resources associated with + the instance. + To be added. @@ -107,10 +148,23 @@ - To be added. - To be added. - To be added. + + An array of that contains the response entity body data. + + + true if this method blocks execution while flushing the stream to the client; otherwise, false. + + + Sends the response with the specified array of to the client and + releases the resources associated with the instance. + To be added. + + is . + + + This object is closed. + @@ -121,9 +175,19 @@ System.Text.Encoding - To be added. - To be added. + + Gets or sets the encoding that can be used with the entity body data included in the response. + + + A that contains the encoding that can be used with the entity body data. + To be added. + + This object is closed. + + + The response has been sent already. + @@ -134,9 +198,23 @@ System.Int64 - To be added. - To be added. + + Gets or sets the size of the entity body data included in the response. + + + A that contains the value of the Content-Length entity-header field. + The value is a number of bytes in the entity body data. + To be added. + + This object is closed. + + + The response has been sent already. + + + The value specified for a set operation is less than zero. + @@ -147,9 +225,26 @@ System.String - To be added. - To be added. + + Gets or sets the media type of the entity body included in the response. + + + The type of the content. + A that contains the value of the Content-Type entity-header field. + To be added. + + This object is closed. + + + The response has been sent already. + + + The value specified for a set operation is . + + + The value specified for a set operation is a . + @@ -160,8 +255,12 @@ WebSocketSharp.Net.CookieCollection - To be added. - To be added. + + Gets or sets the cookies returned with the response. + + + A that contains the cookies returned with the response. + To be added. @@ -176,8 +275,12 @@ - To be added. - To be added. + + A to copy. + + + Copies properties from the specified to this response. + To be added. @@ -189,8 +292,12 @@ WebSocketSharp.Net.WebHeaderCollection - To be added. - To be added. + + Gets or sets the HTTP headers returned to the client. + + + A that contains the HTTP headers returned to the client. + To be added. @@ -202,9 +309,20 @@ System.Boolean - To be added. - To be added. + + Gets or sets a value indicating whether the server requests a persistent connection. + + + true if the server requests a persistent connection; otherwise, false. + The default is true. + To be added. + + This object is closed. + + + The response has been sent already. + @@ -215,9 +333,16 @@ System.IO.Stream - To be added. - To be added. + + Gets a to use to write the entity body data. + + + A to use to write the entity body data. + To be added. + + This object is closed. + @@ -228,9 +353,26 @@ System.Version - To be added. - To be added. + + Gets or sets the HTTP version used in the response. + + + A that contains the HTTP version used in the response. + To be added. + + This object is closed. + + + The response has been sent already. + + + The value specified for a set operation is . + + + The value specified for a set operation does not have its Major property set to 1 or + does not have its Minor property set to either 0 or 1. + @@ -244,8 +386,12 @@ - To be added. - To be added. + + A that contains a URL to redirect the client's request to. + + + Configures the response to redirect the client's request to the specified . + To be added. @@ -257,9 +403,22 @@ System.String - To be added. - To be added. + + Gets or sets the URL to which the client is redirected to locate a requested resource. + + + A that contains the value of the Location response-header field. + To be added. + + This object is closed. + + + The response has been sent already. + + + The value specified for a set operation is a . + @@ -270,9 +429,19 @@ System.Boolean - To be added. - To be added. + + Gets or sets a value indicating whether the response uses the chunked transfer encoding. + + + true if the response uses the chunked transfer encoding; otherwise, false. + To be added. + + This object is closed. + + + The response has been sent already. + @@ -286,9 +455,20 @@ - To be added. - To be added. + + A to set. + + + Adds or updates a in the sent with the response. + To be added. + + is . + + + already exists in the and + could not be replaced. + @@ -299,9 +479,23 @@ System.Int32 - To be added. - To be added. + + Gets or sets the HTTP status code returned to the client. + + + An that indicates the HTTP status code for the response to the request. + The default is . + To be added. + + This object is closed. + + + The response has been sent already. + + + The value specified for a set operation is invalid. Valid values are between 100 and 999. + @@ -312,8 +506,12 @@ System.String - To be added. - To be added. + + Gets or sets a description of the HTTP status code returned to the client. + + + A that contains a description of the HTTP status code returned to the client. + To be added. @@ -326,7 +524,9 @@ - To be added. + + Releases all resource used by the . + To be added. diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/HttpRequestEventArgs.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/HttpRequestEventArgs.xml index d729435b..1eade0c0 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/HttpRequestEventArgs.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/HttpRequestEventArgs.xml @@ -14,8 +14,8 @@ An HTTP request 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. + 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. diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp/CloseEventArgs.xml b/websocket-sharp/doc/mdoc/WebSocketSharp/CloseEventArgs.xml index 29697f3a..0a3edf0c 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp/CloseEventArgs.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp/CloseEventArgs.xml @@ -14,8 +14,8 @@ The event occurs when the WebSocket receives a close control frame or - the WebSocket.Close method is called. If you want to get the reason for closure, you should access the or - properties. + the WebSocket.Close method is called. If you want to get the reason for closure, you should access + the or properties. @@ -62,10 +62,10 @@ - Indicates whether the connection closed cleanly or not. + Indicates whether the WebSocket connection closed cleanly. - true if the connection closed cleanly; otherwise, false. + true if the WebSocket connection closed cleanly; otherwise, false. To be added. diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp/Ext.xml b/websocket-sharp/doc/mdoc/WebSocketSharp/Ext.xml index 0d3e15d3..fbbad4eb 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp/Ext.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp/Ext.xml @@ -76,6 +76,40 @@ + + + + Method + + System.Boolean + + + + + + + System.ParamArray + + + + + + + A to test. + + + An array of that contains characters to find. + + + Determines whether the specified contains any of characters + in the specified array of . + + + true if contains any of ; otherwise, false. + + To be added. + + @@ -403,7 +437,34 @@ Determines whether the specified is a . - true if the parameter is a ; otherwise, false. + true if is ; otherwise, false. + + To be added. + + + + + + Method + + System.Boolean + + + + + + + + A to test. + + + A that contains character to find. + + + Determines whether the specified is enclosed in the specified . + + + true if is enclosed in ; otherwise, false. To be added. diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp/MessageEventArgs.xml b/websocket-sharp/doc/mdoc/WebSocketSharp/MessageEventArgs.xml index 70599855..b7ed5f48 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp/MessageEventArgs.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp/MessageEventArgs.xml @@ -31,7 +31,7 @@ Gets the received data as a . - A that contains a received data. + A that contains the received data. To be added. @@ -48,7 +48,7 @@ Gets the received data as an array of . - An array of that contains a received data. + An array of that contains the received data. To be added. @@ -62,10 +62,10 @@ - Gets the type of received data. + Gets the type of the received data. - One of the that indicates the type of received data. + One of the values that indicates the type of the received data. To be added. diff --git a/websocket-sharp/doc/mdoc/index.xml b/websocket-sharp/doc/mdoc/index.xml index 59088694..3e800560 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 ] @@ -141,6 +141,42 @@ + + + + + + + + ExtensionMethod + + System.Boolean + + + + + + + System.ParamArray + + + + + + + A to test. + + + An array of that contains characters to find. + + + Determines whether the specified contains any of characters + in the specified array of . + + + + + @@ -500,6 +536,35 @@ + + + + + + + + ExtensionMethod + + System.Boolean + + + + + + + + A to test. + + + A that contains character to find. + + + Determines whether the specified is enclosed in the specified . + + + + + diff --git a/websocket-sharp/websocket-sharp.pidb b/websocket-sharp/websocket-sharp.pidb index c65d8469..a4b6ce7e 100644 Binary files a/websocket-sharp/websocket-sharp.pidb and b/websocket-sharp/websocket-sharp.pidb differ