[Modify] Add the static constructor
This commit is contained in:
parent
2dca329d6a
commit
6fdef3c7f2
@ -117,7 +117,7 @@ namespace WebSocketSharp
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the empty array of <see cref="byte"/> used internally.
|
/// Represents the empty array of <see cref="byte"/> used internally.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static readonly byte[] EmptyBytes = new byte[0];
|
internal static readonly byte[] EmptyBytes;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the length used to determine whether the data should be fragmented in sending.
|
/// Represents the length used to determine whether the data should be fragmented in sending.
|
||||||
@ -131,12 +131,23 @@ namespace WebSocketSharp
|
|||||||
/// and <c>Int32.MaxValue - 14</c> inclusive.
|
/// and <c>Int32.MaxValue - 14</c> inclusive.
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
internal static readonly int FragmentLength = 1016;
|
internal static readonly int FragmentLength;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the random number generator used internally.
|
/// Represents the random number generator used internally.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static readonly RandomNumberGenerator RandomNumber = new RNGCryptoServiceProvider ();
|
internal static readonly RandomNumberGenerator RandomNumber;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Static Constructor
|
||||||
|
|
||||||
|
static WebSocket ()
|
||||||
|
{
|
||||||
|
EmptyBytes = new byte[0];
|
||||||
|
FragmentLength = 1016;
|
||||||
|
RandomNumber = new RNGCryptoServiceProvider ();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user