Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Net.WebSockets.WebSocketBuffer Class Referencesealed

Classes

class  PayloadReceiveResult
 

Public Member Functions

void Dispose (WebSocketState webSocketState)
 
void Dispose ()
 

Package Functions

global::Interop.WebSocket.Property[] CreateProperties (bool useZeroMaskingKey)
 
void PinSendBuffer (ArraySegment< byte > payload, out bool bufferHasBeenPinned)
 
IntPtr ConvertPinnedSendPayloadToNative (ArraySegment< byte > payload)
 
IntPtr ConvertPinnedSendPayloadToNative (byte[] buffer, int offset, int count)
 
ArraySegment< byte > ConvertPinnedSendPayloadFromNative (global::Interop.WebSocket.Buffer buffer, WebSocketProtocolComponent.BufferType bufferType)
 
bool IsPinnedSendPayloadBuffer (global::Interop.WebSocket.Buffer buffer, WebSocketProtocolComponent.BufferType bufferType)
 
void ReleasePinnedSendBuffer ()
 
void BufferPayload (ArraySegment< byte > payload, int unconsumedDataOffset, WebSocketMessageType messageType, bool endOfMessage)
 
bool ReceiveFromBufferedPayload (ArraySegment< byte > buffer, out WebSocketReceiveResult receiveResult)
 
ArraySegment< byte > ConvertNativeBuffer (WebSocketProtocolComponent.Action action, global::Interop.WebSocket.Buffer buffer, WebSocketProtocolComponent.BufferType bufferType)
 
void ConvertCloseBuffer (WebSocketProtocolComponent.Action action, global::Interop.WebSocket.Buffer buffer, out WebSocketCloseStatus closeStatus, out string reason)
 
void ValidateNativeBuffers (WebSocketProtocolComponent.Action action, WebSocketProtocolComponent.BufferType bufferType, global::Interop.WebSocket.Buffer[] dataBuffers, uint dataBufferCount)
 
bool IsInternalBuffer (byte[] buffer, int offset, int count)
 
IntPtr ToIntPtr (int offset)
 

Static Package Functions

static WebSocketBuffer CreateServerBuffer (ArraySegment< byte > internalBuffer, int receiveBufferSize)
 
static void UnwrapWebSocketBuffer (global::Interop.WebSocket.Buffer buffer, WebSocketProtocolComponent.BufferType bufferType, out IntPtr bufferData, out uint bufferLength)
 
static ArraySegment< byte > CreateInternalBufferArraySegment (int receiveBufferSize, int sendBufferSize, bool isServerBuffer)
 
static void Validate (int count, int receiveBufferSize, int sendBufferSize, bool isServerBuffer)
 

Properties

int ReceiveBufferSize [get]
 
int SendBufferSize [get]
 

Private Member Functions

 WebSocketBuffer (ArraySegment< byte > internalBuffer, int receiveBufferSize, int sendBufferSize)
 
bool IsPinnedSendPayloadBuffer (byte[] buffer, int offset, int count)
 
void ThrowIfDisposed ()
 
int GetOffset (IntPtr pBuffer)
 
int GetMaxBufferSize ()
 
bool IsNativeBuffer (IntPtr pBuffer, uint bufferSize)
 
void CleanUp ()
 

Static Private Member Functions

static int GetNativeSendBufferSize (int sendBufferSize, bool isServerBuffer)
 
static int GetInternalBufferSize (int receiveBufferSize, int sendBufferSize, bool isServerBuffer)
 

Private Attributes

readonly int _receiveBufferSize
 
readonly long _startAddress
 
readonly long _endAddress
 
GCHandle _gcHandle
 
readonly ArraySegment< byte > _internalBuffer
 
readonly ArraySegment< byte > _nativeBuffer
 
readonly ArraySegment< byte > _payloadBuffer
 
readonly ArraySegment< byte > _propertyBuffer
 
readonly int _sendBufferSize
 
volatile int _payloadOffset
 
volatile PayloadReceiveResult _bufferedPayloadReceiveResult
 
long _pinnedSendBufferStartAddress
 
long _pinnedSendBufferEndAddress
 
ArraySegment< byte > _pinnedSendBuffer
 
GCHandle _pinnedSendBufferHandle
 
int _stateWhenDisposing = int.MinValue
 
int _sendBufferState
 

Static Private Attributes

static readonly int s_PropertyBufferSize = 12 + IntPtr.Size
 

Detailed Description

Definition at line 7 of file WebSocketBuffer.cs.


The documentation for this class was generated from the following file: