OpenSim
|
Reads a byte stream and returns Websocket frames. More...
Public Types | |
enum | OpCode { OpCode.Continue = 0x0, OpCode.Text = 0x1, OpCode.Binary = 0x2, OpCode.Close = 0x8, OpCode.Ping = 0x9, OpCode.Pong = 0xA } |
These are the Frame Opcodes More... | |
Static Public Member Functions | |
static void | Mask (int pMask, byte[] pBuffer) |
Masks and Unmasks data using the frame mask. Mask is applied per octal Note: Frames from clients MUST be masked Note: Frames from servers MUST NOT be masked More... | |
static bool | TryReadHeader (byte[] pBuffer, int pOffset, int length, out WebsocketFrameHeader oHeader, out int moveBuffer) |
Attempts to read a header off the provided buffer. Returns true, exports a WebSocketFrameheader, and an int to move the buffer forward when it reads a header. False when it can't read a header More... | |
Reads a byte stream and returns Websocket frames.
Definition at line 789 of file WebsocketServerHandler.cs.
These are the Frame Opcodes
Enumerator | |
---|---|
Continue | |
Text | |
Binary | |
Close | |
Ping | |
Pong |
Definition at line 799 of file WebsocketServerHandler.cs.
|
inlinestatic |
Masks and Unmasks data using the frame mask. Mask is applied per octal Note: Frames from clients MUST be masked Note: Frames from servers MUST NOT be masked
pMask | Int representing 32 bytes of mask data. Mask is applied per octal |
pBuffer |
Definition at line 819 of file WebsocketServerHandler.cs.
|
inlinestatic |
Attempts to read a header off the provided buffer. Returns true, exports a WebSocketFrameheader, and an int to move the buffer forward when it reads a header. False when it can't read a header
pBuffer | Bytes read from the stream |
pOffset | Starting place in the stream to begin trying to read from |
length | Lenth in the stream to try and read from. Provided for cases where the buffer's length is larger then the data in it |
oHeader | Outputs the read WebSocket frame header |
moveBuffer | Informs the calling stream to move the buffer forward |
Definition at line 850 of file WebsocketServerHandler.cs.