Ejemplo n.º 1
0
        internal Frame(bool isFinal, bool rsv1, bool rsv2, bool rsv3,
                       OpCode opCode, bool shouldMask, byte[] maskingKey = null,
                       int payloadLength = 0, byte[] data = null)
        {
            Headers = new FrameHeaders(
                isFinal,
                rsv1,
                rsv2,
                rsv3,
                opCode,
                shouldMask,
                payloadLength);

            MaskingKey = maskingKey;
            Data       = data ?? new byte[0];
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="headers">The <c>FrameHeaders</c> for this <c>Frame</c></param>
 /// <param name="maskingKey">The data masking key</param>
 /// <param name="data">The frame payload</param>
 internal Frame(FrameHeaders headers, byte[] maskingKey, byte[] data)
 {
     Headers    = headers;
     MaskingKey = maskingKey;
     Data       = data ?? new byte[0];
 }