Mirror::SimpleWeb::Constants
Constant values that should never change More...
Public Attributes
Name | |
---|---|
const int | HeaderSize Header is at most 4 bytes |
const int | HeaderMinSize Smallest size of header |
const int | ShortLength bytes for short length |
const int | MaskSize Message mask is always 4 bytes |
const int | BytePayloadLength Max size of a message for length to be 1 byte long |
const int | UshortPayloadLength if payload length is 126 when next 2 bytes will be the length |
const int | UlongPayloadLength if payload length is 127 when next 8 bytes will be the length |
const string | HandshakeGUID Guid used for WebSocket Protocol |
readonly int | HandshakeGUIDLength |
readonly byte [] | HandshakeGUIDBytes |
readonly byte [] | endOfHandshake Handshake messages will end with |
Detailed Description
class Mirror::SimpleWeb::Constants;
Constant values that should never change
Some values are from https://tools.ietf.org/html/rfc6455
Public Attributes Documentation
variable HeaderSize
const int HeaderSize = 4;
Header is at most 4 bytes
If message is less than 125 then header is 2 bytes, else header is 4 bytes
variable HeaderMinSize
const int HeaderMinSize = 2;
Smallest size of header
If message is less than 125 then header is 2 bytes, else header is 4 bytes
variable ShortLength
const int ShortLength = 2;
bytes for short length
variable MaskSize
const int MaskSize = 4;
Message mask is always 4 bytes
variable BytePayloadLength
const int BytePayloadLength = 125;
Max size of a message for length to be 1 byte long
payload length between 0-125
variable UshortPayloadLength
const int UshortPayloadLength = 126;
if payload length is 126 when next 2 bytes will be the length
variable UlongPayloadLength
const int UlongPayloadLength = 127;
if payload length is 127 when next 8 bytes will be the length
variable HandshakeGUID
const string HandshakeGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
Guid used for WebSocket Protocol
variable HandshakeGUIDLength
static readonly int HandshakeGUIDLength = HandshakeGUID.Length;
variable HandshakeGUIDBytes
static readonly byte [] HandshakeGUIDBytes = Encoding.ASCII.GetBytes(HandshakeGUID);
variable endOfHandshake
static readonly byte [] endOfHandshake = new byte[4] { (byte)'\r', (byte)'\n', (byte)'\r', (byte)'\n' };
Handshake messages will end with
Updated on 24 January 2021 at 23:47:12 UTC