Skip to content

Commit 0e0a79c

Browse files
committed
Merge branch 'develop' of https://github.com/watson-developer-cloud/unity-sdk into develop
2 parents 5cfdde3 + b0ef2e6 commit 0e0a79c

File tree

169 files changed

+2050
-1391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+2050
-1391
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
4+
// Information about this assembly is defined by the following attributes.
5+
// Change them to the values specific to your project.
6+
7+
[assembly: AssemblyTitle("websocket-sharp")]
8+
[assembly: AssemblyDescription("A C# implementation of the WebSocket protocol client and server")]
9+
[assembly: AssemblyConfiguration("")]
10+
[assembly: AssemblyCompany("")]
11+
[assembly: AssemblyProduct("websocket-sharp.dll")]
12+
[assembly: AssemblyCopyright("sta.blockhead")]
13+
[assembly: AssemblyTrademark("")]
14+
[assembly: AssemblyCulture("")]
15+
16+
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17+
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
18+
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
19+
20+
[assembly: AssemblyVersion("1.0.2.*")]
21+
22+
// The following attributes are used to specify the signing key for the assembly,
23+
// if desired. See the Mono documentation for more information about signing.
24+
25+
//[assembly: AssemblyDelaySign(false)]
26+
//[assembly: AssemblyKeyFile("")]

ThirdParty/WebSocketSharp/AssemblyInfo.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ThirdParty/WebSocketSharp/ByteOrder.cs

100644100755
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* The MIT License
66
*
7-
* Copyright (c) 2012-2014 sta.blockhead
7+
* Copyright (c) 2012-2015 sta.blockhead
88
*
99
* Permission is hereby granted, free of charge, to any person obtaining a copy
1010
* of this software and associated documentation files (the "Software"), to deal
@@ -31,16 +31,16 @@
3131
namespace WebSocketSharp
3232
{
3333
/// <summary>
34-
/// Contains the values that indicate whether the byte order is a Little-endian or Big-endian.
34+
/// Specifies the byte order.
3535
/// </summary>
36-
public enum ByteOrder : byte
36+
public enum ByteOrder
3737
{
3838
/// <summary>
39-
/// Indicates a Little-endian.
39+
/// Specifies Little-endian.
4040
/// </summary>
4141
Little,
4242
/// <summary>
43-
/// Indicates a Big-endian.
43+
/// Specifies Big-endian.
4444
/// </summary>
4545
Big
4646
}

ThirdParty/WebSocketSharp/ByteOrder.cs.meta

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ThirdParty/WebSocketSharp/CloseEventArgs.cs

100644100755
Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,20 @@
2727
#endregion
2828

2929
using System;
30-
using System.Text;
3130

3231
namespace WebSocketSharp
3332
{
3433
/// <summary>
35-
/// Contains the event data associated with a <see cref="WebSocket.OnClose"/> event.
34+
/// Represents the event data for the <see cref="WebSocket.OnClose"/> event.
3635
/// </summary>
3736
/// <remarks>
3837
/// <para>
39-
/// A <see cref="WebSocket.OnClose"/> event occurs when the WebSocket connection has been
40-
/// closed.
38+
/// A <see cref="WebSocket.OnClose"/> event occurs when the WebSocket connection
39+
/// has been closed.
4140
/// </para>
4241
/// <para>
4342
/// If you would like to get the reason for the close, you should access
44-
/// the <see cref="CloseEventArgs.Code"/> or <see cref="CloseEventArgs.Reason"/> property.
43+
/// the <see cref="Code"/> or <see cref="Reason"/> property.
4544
/// </para>
4645
/// </remarks>
4746
public class CloseEventArgs : EventArgs
@@ -51,7 +50,6 @@ public class CloseEventArgs : EventArgs
5150
private bool _clean;
5251
private ushort _code;
5352
private PayloadData _payloadData;
54-
private byte[] _rawData;
5553
private string _reason;
5654

5755
#endregion
@@ -61,14 +59,12 @@ public class CloseEventArgs : EventArgs
6159
internal CloseEventArgs ()
6260
{
6361
_code = (ushort) CloseStatusCode.NoStatus;
64-
_payloadData = new PayloadData ();
65-
_rawData = _payloadData.ApplicationData;
62+
_payloadData = PayloadData.Empty;
6663
}
6764

6865
internal CloseEventArgs (ushort code)
6966
{
7067
_code = code;
71-
_rawData = code.InternalToByteArray (ByteOrder.Big);
7268
}
7369

7470
internal CloseEventArgs (CloseStatusCode code)
@@ -79,23 +75,22 @@ internal CloseEventArgs (CloseStatusCode code)
7975
internal CloseEventArgs (PayloadData payloadData)
8076
{
8177
_payloadData = payloadData;
82-
_rawData = payloadData.ApplicationData;
8378

84-
var len = _rawData.Length;
79+
var data = payloadData.ApplicationData;
80+
var len = data.Length;
8581
_code = len > 1
86-
? _rawData.SubArray (0, 2).ToUInt16 (ByteOrder.Big)
82+
? data.SubArray (0, 2).ToUInt16 (ByteOrder.Big)
8783
: (ushort) CloseStatusCode.NoStatus;
8884

8985
_reason = len > 2
90-
? _rawData.SubArray (2, len - 2).UTF8Decode ()
86+
? data.SubArray (2, len - 2).UTF8Decode ()
9187
: String.Empty;
9288
}
9389

9490
internal CloseEventArgs (ushort code, string reason)
9591
{
9692
_code = code;
9793
_reason = reason;
98-
_rawData = code.Append (reason);
9994
}
10095

10196
internal CloseEventArgs (CloseStatusCode code, string reason)
@@ -109,13 +104,7 @@ internal CloseEventArgs (CloseStatusCode code, string reason)
109104

110105
internal PayloadData PayloadData {
111106
get {
112-
return _payloadData ?? (_payloadData = new PayloadData (_rawData));
113-
}
114-
}
115-
116-
internal byte[] RawData {
117-
get {
118-
return _rawData;
107+
return _payloadData ?? (_payloadData = new PayloadData (_code.Append (_reason)));
119108
}
120109
}
121110

@@ -148,10 +137,10 @@ public string Reason {
148137
}
149138

150139
/// <summary>
151-
/// Gets a value indicating whether the WebSocket connection has been closed cleanly.
140+
/// Gets a value indicating whether the connection has been closed cleanly.
152141
/// </summary>
153142
/// <value>
154-
/// <c>true</c> if the WebSocket connection has been closed cleanly; otherwise, <c>false</c>.
143+
/// <c>true</c> if the connection has been closed cleanly; otherwise, <c>false</c>.
155144
/// </value>
156145
public bool WasClean {
157146
get {

ThirdParty/WebSocketSharp/CloseEventArgs.cs.meta

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ThirdParty/WebSocketSharp/CloseStatusCode.cs

100644100755
Lines changed: 29 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -31,92 +31,84 @@
3131
namespace WebSocketSharp
3232
{
3333
/// <summary>
34-
/// Contains the values of the status code for the WebSocket connection close.
34+
/// Indicates the status code for the WebSocket connection close.
3535
/// </summary>
3636
/// <remarks>
3737
/// <para>
38-
/// The values of the status code are defined in
38+
/// The values of this enumeration are defined in
3939
/// <see href="http://tools.ietf.org/html/rfc6455#section-7.4">Section 7.4</see> of RFC 6455.
4040
/// </para>
4141
/// <para>
42-
/// "Reserved value" must not be set as a status code in a close control frame by
42+
/// "Reserved value" must not be set as a status code in a connection close frame by
4343
/// an endpoint. It's designated for use in applications expecting a status code to
4444
/// indicate that the connection was closed due to the system grounds.
4545
/// </para>
4646
/// </remarks>
4747
public enum CloseStatusCode : ushort
4848
{
4949
/// <summary>
50-
/// Equivalent to close status 1000.
51-
/// Indicates a normal close.
50+
/// Equivalent to close status 1000. Indicates normal close.
5251
/// </summary>
5352
Normal = 1000,
5453
/// <summary>
55-
/// Equivalent to close status 1001.
56-
/// Indicates that an endpoint is going away.
54+
/// Equivalent to close status 1001. Indicates that an endpoint is going away.
5755
/// </summary>
5856
Away = 1001,
5957
/// <summary>
60-
/// Equivalent to close status 1002.
61-
/// Indicates that an endpoint is terminating the connection due to a protocol error.
58+
/// Equivalent to close status 1002. Indicates that an endpoint is terminating
59+
/// the connection due to a protocol error.
6260
/// </summary>
6361
ProtocolError = 1002,
6462
/// <summary>
65-
/// Equivalent to close status 1003.
66-
/// Indicates that an endpoint is terminating the connection because it has received
67-
/// a type of data that it cannot accept.
63+
/// Equivalent to close status 1003. Indicates that an endpoint is terminating
64+
/// the connection because it has received a type of data that it cannot accept.
6865
/// </summary>
6966
UnsupportedData = 1003,
7067
/// <summary>
71-
/// Equivalent to close status 1004.
72-
/// Still undefined. A Reserved value.
68+
/// Equivalent to close status 1004. Still undefined. A Reserved value.
7369
/// </summary>
7470
Undefined = 1004,
7571
/// <summary>
76-
/// Equivalent to close status 1005.
77-
/// Indicates that no status code was actually present. A Reserved value.
72+
/// Equivalent to close status 1005. Indicates that no status code was actually present.
73+
/// A Reserved value.
7874
/// </summary>
7975
NoStatus = 1005,
8076
/// <summary>
81-
/// Equivalent to close status 1006.
82-
/// Indicates that the connection was closed abnormally. A Reserved value.
77+
/// Equivalent to close status 1006. Indicates that the connection was closed abnormally.
78+
/// A Reserved value.
8379
/// </summary>
8480
Abnormal = 1006,
8581
/// <summary>
86-
/// Equivalent to close status 1007.
87-
/// Indicates that an endpoint is terminating the connection because it has received
88-
/// a message that contains data that isn't consistent with the type of the message.
82+
/// Equivalent to close status 1007. Indicates that an endpoint is terminating
83+
/// the connection because it has received a message that contains data that
84+
/// isn't consistent with the type of the message.
8985
/// </summary>
9086
InvalidData = 1007,
9187
/// <summary>
92-
/// Equivalent to close status 1008.
93-
/// Indicates that an endpoint is terminating the connection because it has received
94-
/// a message that violates its policy.
88+
/// Equivalent to close status 1008. Indicates that an endpoint is terminating
89+
/// the connection because it has received a message that violates its policy.
9590
/// </summary>
9691
PolicyViolation = 1008,
9792
/// <summary>
98-
/// Equivalent to close status 1009.
99-
/// Indicates that an endpoint is terminating the connection because it has received
100-
/// a message that is too big to process.
93+
/// Equivalent to close status 1009. Indicates that an endpoint is terminating
94+
/// the connection because it has received a message that is too big to process.
10195
/// </summary>
10296
TooBig = 1009,
10397
/// <summary>
104-
/// Equivalent to close status 1010.
105-
/// Indicates that a client is terminating the connection because it has expected
106-
/// the server to negotiate one or more extension, but the server didn't return
107-
/// them in the handshake response.
98+
/// Equivalent to close status 1010. Indicates that a client is terminating
99+
/// the connection because it has expected the server to negotiate one or more extension,
100+
/// but the server didn't return them in the handshake response.
108101
/// </summary>
109102
MandatoryExtension = 1010,
110103
/// <summary>
111-
/// Equivalent to close status 1011.
112-
/// Indicates that a server is terminating the connection because it has encountered
113-
/// an unexpected condition that prevented it from fulfilling the request.
104+
/// Equivalent to close status 1011. Indicates that a server is terminating
105+
/// the connection because it has encountered an unexpected condition that
106+
/// prevented it from fulfilling the request.
114107
/// </summary>
115108
ServerError = 1011,
116109
/// <summary>
117-
/// Equivalent to close status 1015.
118-
/// Indicates that the connection was closed due to a failure to perform a TLS handshake.
119-
/// A Reserved value.
110+
/// Equivalent to close status 1015. Indicates that the connection was closed
111+
/// due to a failure to perform a TLS handshake. A Reserved value.
120112
/// </summary>
121113
TlsHandshakeFailure = 1015
122114
}

ThirdParty/WebSocketSharp/CloseStatusCode.cs.meta

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ThirdParty/WebSocketSharp/CompressionMethod.cs

100644100755
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* The MIT License
66
*
7-
* Copyright (c) 2013-2014 sta.blockhead
7+
* Copyright (c) 2013-2015 sta.blockhead
88
*
99
* Permission is hereby granted, free of charge, to any person obtaining a copy
1010
* of this software and associated documentation files (the "Software"), to deal
@@ -31,22 +31,21 @@
3131
namespace WebSocketSharp
3232
{
3333
/// <summary>
34-
/// Contains the values of the compression method used to compress the message on the WebSocket
35-
/// connection.
34+
/// Specifies the compression method used to compress a message on the WebSocket connection.
3635
/// </summary>
3736
/// <remarks>
38-
/// The values of the compression method are defined in
39-
/// <see href="http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-09">Compression
40-
/// Extensions for WebSocket</see>.
37+
/// The compression methods are defined in
38+
/// <see href="http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-19">
39+
/// Compression Extensions for WebSocket</see>.
4140
/// </remarks>
4241
public enum CompressionMethod : byte
4342
{
4443
/// <summary>
45-
/// Indicates non compression.
44+
/// Specifies non compression.
4645
/// </summary>
4746
None,
4847
/// <summary>
49-
/// Indicates using DEFLATE.
48+
/// Specifies DEFLATE.
5049
/// </summary>
5150
Deflate
5251
}

ThirdParty/WebSocketSharp/CompressionMethod.cs.meta

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)