Class WebSocketFrameWriter
- Namespace
- Alis.Core.Network.Internal
- Assembly
- Alis.dll
The web socket frame writer class
internal static class WebSocketFrameWriterInheritance
Inherited Members
Methods
DeterminePayloadCount(ArraySegment<byte>)
Determines the payload count using the specified from payload
internal static int DeterminePayloadCount(ArraySegment<byte> fromPayload)Parameters
- fromPayloadArraySegment<byte>
- 
The from payload 
Returns
- int
- 
The int 
Write(WebSocketOpCode, ArraySegment<byte>, MemoryStream, bool, bool)
No async await stuff here because we are dealing with a memory stream
public static void Write(WebSocketOpCode opCode, ArraySegment<byte> fromPayload, MemoryStream toStream, bool isLastFrame, bool isClient)Parameters
- opCodeWebSocketOpCode
- 
The web socket opcode 
- fromPayloadArraySegment<byte>
- 
Array segment to get payload data from 
- toStreamMemoryStream
- 
Stream to write to 
- isLastFramebool
- 
True is this is the last frame in this message (usually true) 
- isClientbool
WriteByteWithPayloadCount(byte, int, MemoryStream)
Writes the byte with payload count using the specified mask bit set as byte
internal static void WriteByteWithPayloadCount(byte maskBitSetAsByte, int payloadCount, MemoryStream toStream)Parameters
- maskBitSetAsBytebyte
- 
The mask bit set as byte 
- payloadCountint
- 
The payload count 
- toStreamMemoryStream
- 
The to stream 
WriteMaskedPayload(ArraySegment<byte>, MemoryStream)
Writes the masked payload using the specified from payload
internal static void WriteMaskedPayload(ArraySegment<byte> fromPayload, MemoryStream toStream)Parameters
- fromPayloadArraySegment<byte>
- 
The from payload 
- toStreamMemoryStream
- 
The to stream 
WritePayloadData(ArraySegment<byte>, MemoryStream)
Writes the payload data using the specified from payload
internal static void WritePayloadData(ArraySegment<byte> fromPayload, MemoryStream toStream)Parameters
- fromPayloadArraySegment<byte>
- 
The from payload 
- toStreamMemoryStream
- 
The to stream 
WritePayloadLength(ArraySegment<byte>, MemoryStream, bool)
Writes the payload length using the specified from payload
internal static void WritePayloadLength(ArraySegment<byte> fromPayload, MemoryStream toStream, bool isClient)Parameters
- fromPayloadArraySegment<byte>
- 
The from payload 
- toStreamMemoryStream
- 
The to stream 
- isClientbool
- 
The is client