diff --git a/Example/Example.pidb b/Example/Example.pidb index 4455265e..d140d970 100644 Binary files a/Example/Example.pidb and b/Example/Example.pidb differ diff --git a/Example/bin/Debug/example.exe b/Example/bin/Debug/example.exe index 9a42d5a4..e8756918 100755 Binary files a/Example/bin/Debug/example.exe and b/Example/bin/Debug/example.exe differ diff --git a/Example/bin/Debug/example.exe.mdb b/Example/bin/Debug/example.exe.mdb deleted file mode 100644 index 9d1afa5b..00000000 Binary files a/Example/bin/Debug/example.exe.mdb and /dev/null differ diff --git a/Example/bin/Debug/websocket-sharp.dll b/Example/bin/Debug/websocket-sharp.dll index 57dd7bdf..f2c3f003 100755 Binary files a/Example/bin/Debug/websocket-sharp.dll and b/Example/bin/Debug/websocket-sharp.dll differ diff --git a/Example/bin/Debug/websocket-sharp.dll.mdb b/Example/bin/Debug/websocket-sharp.dll.mdb deleted file mode 100644 index e5e66409..00000000 Binary files a/Example/bin/Debug/websocket-sharp.dll.mdb and /dev/null differ diff --git a/Example/bin/Debug_Ubuntu/example.exe b/Example/bin/Debug_Ubuntu/example.exe index 75506bba..5d0e35a2 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 deleted file mode 100644 index 6fa4d587..00000000 Binary files a/Example/bin/Debug_Ubuntu/example.exe.mdb and /dev/null differ diff --git a/Example/bin/Debug_Ubuntu/websocket-sharp.dll b/Example/bin/Debug_Ubuntu/websocket-sharp.dll index 8cae1dca..e7cc86f5 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 deleted file mode 100644 index 99662072..00000000 Binary files a/Example/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and /dev/null differ diff --git a/Example/bin/Release/example.exe b/Example/bin/Release/example.exe index 9df7db74..36a5fb4b 100755 Binary files a/Example/bin/Release/example.exe and b/Example/bin/Release/example.exe differ diff --git a/Example/bin/Release/websocket-sharp.dll b/Example/bin/Release/websocket-sharp.dll index 9f4c0c65..643eb71b 100755 Binary files a/Example/bin/Release/websocket-sharp.dll and b/Example/bin/Release/websocket-sharp.dll differ diff --git a/Example/bin/Release_Ubuntu/example.exe b/Example/bin/Release_Ubuntu/example.exe index 3c3b3be5..26e4d422 100755 Binary files a/Example/bin/Release_Ubuntu/example.exe and b/Example/bin/Release_Ubuntu/example.exe differ diff --git a/Example/bin/Release_Ubuntu/websocket-sharp.dll b/Example/bin/Release_Ubuntu/websocket-sharp.dll index 4b57a6a1..5a3f9686 100755 Binary files a/Example/bin/Release_Ubuntu/websocket-sharp.dll and b/Example/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/Example1/bin/Debug/example1.exe b/Example1/bin/Debug/example1.exe index b275d7bd..ba7fc6d9 100755 Binary files a/Example1/bin/Debug/example1.exe and b/Example1/bin/Debug/example1.exe differ diff --git a/Example1/bin/Debug/example1.exe.mdb b/Example1/bin/Debug/example1.exe.mdb deleted file mode 100644 index 2b1a7c51..00000000 Binary files a/Example1/bin/Debug/example1.exe.mdb and /dev/null differ diff --git a/Example1/bin/Debug/websocket-sharp.dll b/Example1/bin/Debug/websocket-sharp.dll index 57dd7bdf..f2c3f003 100755 Binary files a/Example1/bin/Debug/websocket-sharp.dll and b/Example1/bin/Debug/websocket-sharp.dll differ diff --git a/Example1/bin/Debug/websocket-sharp.dll.mdb b/Example1/bin/Debug/websocket-sharp.dll.mdb deleted file mode 100644 index e5e66409..00000000 Binary files a/Example1/bin/Debug/websocket-sharp.dll.mdb and /dev/null differ diff --git a/Example1/bin/Debug_Ubuntu/example1.exe b/Example1/bin/Debug_Ubuntu/example1.exe index e7fd11ec..8660283f 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 deleted file mode 100644 index cdf6c7cd..00000000 Binary files a/Example1/bin/Debug_Ubuntu/example1.exe.mdb and /dev/null differ diff --git a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll b/Example1/bin/Debug_Ubuntu/websocket-sharp.dll index 8cae1dca..e7cc86f5 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 deleted file mode 100644 index 99662072..00000000 Binary files a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and /dev/null differ diff --git a/Example1/bin/Release/example1.exe b/Example1/bin/Release/example1.exe index 39325deb..ed0bd74a 100755 Binary files a/Example1/bin/Release/example1.exe and b/Example1/bin/Release/example1.exe differ diff --git a/Example1/bin/Release/websocket-sharp.dll b/Example1/bin/Release/websocket-sharp.dll index 9f4c0c65..643eb71b 100755 Binary files a/Example1/bin/Release/websocket-sharp.dll and b/Example1/bin/Release/websocket-sharp.dll differ diff --git a/Example1/bin/Release_Ubuntu/example1.exe b/Example1/bin/Release_Ubuntu/example1.exe index 83f4b371..69260fb5 100755 Binary files a/Example1/bin/Release_Ubuntu/example1.exe and b/Example1/bin/Release_Ubuntu/example1.exe differ diff --git a/Example1/bin/Release_Ubuntu/websocket-sharp.dll b/Example1/bin/Release_Ubuntu/websocket-sharp.dll index 4b57a6a1..5a3f9686 100755 Binary files a/Example1/bin/Release_Ubuntu/websocket-sharp.dll and b/Example1/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/Example2/bin/Debug/example2.exe b/Example2/bin/Debug/example2.exe index 843cae2c..3b2bbc8f 100755 Binary files a/Example2/bin/Debug/example2.exe and b/Example2/bin/Debug/example2.exe differ diff --git a/Example2/bin/Debug/example2.exe.mdb b/Example2/bin/Debug/example2.exe.mdb deleted file mode 100644 index b250fe86..00000000 Binary files a/Example2/bin/Debug/example2.exe.mdb and /dev/null differ diff --git a/Example2/bin/Debug/websocket-sharp.dll b/Example2/bin/Debug/websocket-sharp.dll index 57dd7bdf..f2c3f003 100755 Binary files a/Example2/bin/Debug/websocket-sharp.dll and b/Example2/bin/Debug/websocket-sharp.dll differ diff --git a/Example2/bin/Debug/websocket-sharp.dll.mdb b/Example2/bin/Debug/websocket-sharp.dll.mdb deleted file mode 100644 index e5e66409..00000000 Binary files a/Example2/bin/Debug/websocket-sharp.dll.mdb and /dev/null differ diff --git a/Example2/bin/Debug_Ubuntu/example2.exe b/Example2/bin/Debug_Ubuntu/example2.exe index 16b3e636..440909b6 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 deleted file mode 100644 index a18b9477..00000000 Binary files a/Example2/bin/Debug_Ubuntu/example2.exe.mdb and /dev/null differ diff --git a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll b/Example2/bin/Debug_Ubuntu/websocket-sharp.dll index 8cae1dca..e7cc86f5 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 deleted file mode 100644 index 99662072..00000000 Binary files a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and /dev/null differ diff --git a/Example2/bin/Release/example2.exe b/Example2/bin/Release/example2.exe index 36d4c56a..c0e8a684 100755 Binary files a/Example2/bin/Release/example2.exe and b/Example2/bin/Release/example2.exe differ diff --git a/Example2/bin/Release/websocket-sharp.dll b/Example2/bin/Release/websocket-sharp.dll index 9f4c0c65..643eb71b 100755 Binary files a/Example2/bin/Release/websocket-sharp.dll and b/Example2/bin/Release/websocket-sharp.dll differ diff --git a/Example2/bin/Release_Ubuntu/example2.exe b/Example2/bin/Release_Ubuntu/example2.exe index edc8442f..35a8d0c0 100755 Binary files a/Example2/bin/Release_Ubuntu/example2.exe and b/Example2/bin/Release_Ubuntu/example2.exe differ diff --git a/Example2/bin/Release_Ubuntu/websocket-sharp.dll b/Example2/bin/Release_Ubuntu/websocket-sharp.dll index 4b57a6a1..5a3f9686 100755 Binary files a/Example2/bin/Release_Ubuntu/websocket-sharp.dll and b/Example2/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/Example3/bin/Debug/Example3.exe b/Example3/bin/Debug/Example3.exe index dfba6b4d..28a49480 100755 Binary files a/Example3/bin/Debug/Example3.exe and b/Example3/bin/Debug/Example3.exe differ diff --git a/Example3/bin/Debug/Example3.exe.mdb b/Example3/bin/Debug/Example3.exe.mdb deleted file mode 100644 index dbafc597..00000000 Binary files a/Example3/bin/Debug/Example3.exe.mdb and /dev/null differ diff --git a/Example3/bin/Debug/websocket-sharp.dll b/Example3/bin/Debug/websocket-sharp.dll index 57dd7bdf..f2c3f003 100755 Binary files a/Example3/bin/Debug/websocket-sharp.dll and b/Example3/bin/Debug/websocket-sharp.dll differ diff --git a/Example3/bin/Debug/websocket-sharp.dll.mdb b/Example3/bin/Debug/websocket-sharp.dll.mdb deleted file mode 100644 index e5e66409..00000000 Binary files a/Example3/bin/Debug/websocket-sharp.dll.mdb and /dev/null differ diff --git a/Example3/bin/Debug_Ubuntu/Example3.exe b/Example3/bin/Debug_Ubuntu/Example3.exe index 89bd6e5a..d2580fc3 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 deleted file mode 100644 index b0acc465..00000000 Binary files a/Example3/bin/Debug_Ubuntu/Example3.exe.mdb and /dev/null differ diff --git a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll b/Example3/bin/Debug_Ubuntu/websocket-sharp.dll index 8cae1dca..e7cc86f5 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 deleted file mode 100644 index 99662072..00000000 Binary files a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and /dev/null differ diff --git a/Example3/bin/Release/Example3.exe b/Example3/bin/Release/Example3.exe index 0764424d..a77649df 100755 Binary files a/Example3/bin/Release/Example3.exe and b/Example3/bin/Release/Example3.exe differ diff --git a/Example3/bin/Release/websocket-sharp.dll b/Example3/bin/Release/websocket-sharp.dll index 9f4c0c65..643eb71b 100755 Binary files a/Example3/bin/Release/websocket-sharp.dll and b/Example3/bin/Release/websocket-sharp.dll differ diff --git a/Example3/bin/Release_Ubuntu/Example3.exe b/Example3/bin/Release_Ubuntu/Example3.exe index 5a08c817..40100770 100755 Binary files a/Example3/bin/Release_Ubuntu/Example3.exe and b/Example3/bin/Release_Ubuntu/Example3.exe differ diff --git a/Example3/bin/Release_Ubuntu/websocket-sharp.dll b/Example3/bin/Release_Ubuntu/websocket-sharp.dll index 4b57a6a1..5a3f9686 100755 Binary files a/Example3/bin/Release_Ubuntu/websocket-sharp.dll and b/Example3/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/websocket-sharp/CompressionMethod.cs b/websocket-sharp/CompressionMethod.cs index a1003b72..dcd7bc6f 100644 --- a/websocket-sharp/CompressionMethod.cs +++ b/websocket-sharp/CompressionMethod.cs @@ -35,8 +35,7 @@ namespace WebSocketSharp { /// /// /// The CompressionMethod enumeration contains the values of the compression methods defined in - /// WebSocket Per-message Compression - /// specification for a WebSocket extension. + /// Compression Extensions for WebSocket. /// public enum CompressionMethod : byte { diff --git a/websocket-sharp/MessageEventArgs.cs b/websocket-sharp/MessageEventArgs.cs index 9f928571..26c2bdf7 100644 --- a/websocket-sharp/MessageEventArgs.cs +++ b/websocket-sharp/MessageEventArgs.cs @@ -41,29 +41,31 @@ namespace WebSocketSharp { /// public class MessageEventArgs : EventArgs { - #region Fields + #region Private Fields - private PayloadData _data; - private Opcode _type; + private byte[] _data; + private Opcode _opcode; #endregion - #region Constructors + #region Internal Constructors - internal MessageEventArgs(Opcode type, byte[] data) - : this(type, new PayloadData(data)) + internal MessageEventArgs(Opcode opcode, byte[] data) { + if ((ulong)data.LongLength > PayloadData.MaxLength) + throw new WebSocketException(CloseStatusCode.TOO_BIG); + + init(opcode, data); } - internal MessageEventArgs(Opcode type, PayloadData data) + internal MessageEventArgs(Opcode opcode, PayloadData data) { - _type = type; - _data = data; + init(opcode, data.ApplicationData); } #endregion - #region Properties + #region Public Properties /// /// Gets the received data as a . @@ -73,11 +75,11 @@ namespace WebSocketSharp { /// public string Data { get { - return _type == Opcode.TEXT || _type == Opcode.PING || _type == Opcode.PONG - ? _data.Length > 0 - ? Encoding.UTF8.GetString(_data.ToByteArray()) + return _opcode == Opcode.TEXT || _opcode == Opcode.PING || _opcode == Opcode.PONG + ? _data.LongLength > 0 + ? Encoding.UTF8.GetString(_data) : String.Empty - : _type.ToString(); + : _opcode.ToString(); } } @@ -89,7 +91,7 @@ namespace WebSocketSharp { /// public byte[] RawData { get { - return _data.ToByteArray(); + return _data; } } @@ -101,10 +103,20 @@ namespace WebSocketSharp { /// public Opcode Type { get { - return _type; + return _opcode; } } #endregion + + #region Private Methods + + private void init(Opcode opcode, byte[] data) + { + _opcode = opcode; + _data = data; + } + + #endregion } } diff --git a/websocket-sharp/WebSocket.cs b/websocket-sharp/WebSocket.cs index 12abf56a..2a70152f 100644 --- a/websocket-sharp/WebSocket.cs +++ b/websocket-sharp/WebSocket.cs @@ -930,11 +930,12 @@ namespace WebSocketSharp { if (frame.IsCompressed && _compression == CompressionMethod.NONE) return false; - var data = frame.IsCompressed - ? new PayloadData(frame.PayloadData.ApplicationData.Decompress(_compression)) - : frame.PayloadData; + var args = frame.IsCompressed + ? new MessageEventArgs( + frame.Opcode, frame.PayloadData.ApplicationData.Decompress(_compression)) + : new MessageEventArgs(frame.Opcode, frame.PayloadData); - onMessage(new MessageEventArgs(frame.Opcode, data)); + onMessage(args); return true; } diff --git a/websocket-sharp/bin/Debug/websocket-sharp.dll b/websocket-sharp/bin/Debug/websocket-sharp.dll index 57dd7bdf..f2c3f003 100755 Binary files a/websocket-sharp/bin/Debug/websocket-sharp.dll and b/websocket-sharp/bin/Debug/websocket-sharp.dll differ diff --git a/websocket-sharp/bin/Debug/websocket-sharp.dll.mdb b/websocket-sharp/bin/Debug/websocket-sharp.dll.mdb deleted file mode 100644 index e5e66409..00000000 Binary files a/websocket-sharp/bin/Debug/websocket-sharp.dll.mdb and /dev/null differ diff --git a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll index 8cae1dca..e7cc86f5 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 deleted file mode 100644 index 99662072..00000000 Binary files a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and /dev/null differ diff --git a/websocket-sharp/bin/Release/websocket-sharp.dll b/websocket-sharp/bin/Release/websocket-sharp.dll index 9f4c0c65..643eb71b 100755 Binary files a/websocket-sharp/bin/Release/websocket-sharp.dll and b/websocket-sharp/bin/Release/websocket-sharp.dll differ diff --git a/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll b/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll index d826c431..5a3f9686 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 6eb4da88..c989b4a9 100644 --- a/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.xml +++ b/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.xml @@ -830,19 +830,6 @@ true if the WebSocket connection closed cleanly; otherwise, false. - - - Represents the exception that occurred when attempting to perform an operation on the WebSocket connection. - - - - - Gets the associated with a . - - - One of the values that indicates the cause of the exception. - - Contains the values that indicate whether the byte order is a Little-endian or Big-endian. @@ -5197,8 +5184,7 @@ The CompressionMethod enumeration contains the values of the compression methods defined in - WebSocket Per-message Compression - specification for a WebSocket extension. + Compression Extensions for WebSocket. @@ -5211,5 +5197,18 @@ Indicates using DEFLATE. + + + Represents the exception that occurred when attempting to perform an operation on the WebSocket connection. + + + + + Gets the associated with a . + + + One of the values that indicates the cause of the exception. + + diff --git a/websocket-sharp/doc/html/WebSocketSharp/CompressionMethod.html b/websocket-sharp/doc/html/WebSocketSharp/CompressionMethod.html index d0b8faf7..115d0ec5 100644 --- a/websocket-sharp/doc/html/WebSocketSharp/CompressionMethod.html +++ b/websocket-sharp/doc/html/WebSocketSharp/CompressionMethod.html @@ -217,8 +217,7 @@

Remarks

The CompressionMethod enumeration contains the values of the compression methods defined in - WebSocket Per-message Compression - specification for a WebSocket extension. + Compression Extensions for WebSocket.

Members

diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp/CompressionMethod.xml b/websocket-sharp/doc/mdoc/WebSocketSharp/CompressionMethod.xml index f2ae6135..cc4edb42 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp/CompressionMethod.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp/CompressionMethod.xml @@ -13,8 +13,7 @@ The CompressionMethod enumeration contains the values of the compression methods defined in - WebSocket Per-message Compression - specification for a WebSocket extension. + Compression Extensions for WebSocket. diff --git a/websocket-sharp/doc/mdoc/index.xml b/websocket-sharp/doc/mdoc/index.xml index 0da8b383..6bff0398 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 ] diff --git a/websocket-sharp/websocket-sharp.pidb b/websocket-sharp/websocket-sharp.pidb index bf5a1ad4..612349ee 100644 Binary files a/websocket-sharp/websocket-sharp.pidb and b/websocket-sharp/websocket-sharp.pidb differ