2017-04-24 21:04:52 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2017-04-27 20:44:30 +00:00
|
|
|
|
namespace Kneesocks {
|
|
|
|
|
public class Frame {
|
2017-04-25 21:01:41 +00:00
|
|
|
|
public enum kOpcode {
|
|
|
|
|
Continuation = 0x0,
|
|
|
|
|
TextFrame = 0x1,
|
|
|
|
|
BinaryFrame = 0x2,
|
|
|
|
|
Close = 0x8,
|
|
|
|
|
Ping = 0x9,
|
|
|
|
|
Pong = 0xA
|
|
|
|
|
};
|
|
|
|
|
|
2017-04-27 20:44:57 +00:00
|
|
|
|
public kOpcode Opcode { get; set; }
|
|
|
|
|
public bool IsFinal { get; set; }
|
|
|
|
|
public bool IsMasked { get; set; }
|
|
|
|
|
public byte[] Mask { get; set; }
|
|
|
|
|
public byte Reserved { get; set; }
|
2017-04-24 21:04:52 +00:00
|
|
|
|
|
2017-04-27 20:44:57 +00:00
|
|
|
|
|
|
|
|
|
public byte[] Content { get; private set; }
|
2017-04-24 21:04:52 +00:00
|
|
|
|
}
|
|
|
|
|
}
|