Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ UnwrapWebSocketBuffer()

static void System.Net.WebSockets.WebSocketBuffer.UnwrapWebSocketBuffer ( global::Interop::WebSocket::Buffer buffer,
WebSocketProtocolComponent::BufferType bufferType,
out IntPtr bufferData,
out uint bufferLength )
inlinestaticpackage

Definition at line 339 of file WebSocketBuffer.cs.

340 {
341 bufferData = IntPtr.Zero;
342 bufferLength = 0u;
343 switch (bufferType)
344 {
345 case WebSocketProtocolComponent.BufferType.Close:
346 bufferData = buffer.CloseStatus.ReasonData;
347 bufferLength = buffer.CloseStatus.ReasonLength;
348 break;
349 case WebSocketProtocolComponent.BufferType.UTF8Message:
350 case WebSocketProtocolComponent.BufferType.UTF8Fragment:
351 case WebSocketProtocolComponent.BufferType.BinaryMessage:
352 case WebSocketProtocolComponent.BufferType.BinaryFragment:
353 case WebSocketProtocolComponent.BufferType.PingPong:
354 case WebSocketProtocolComponent.BufferType.UnsolicitedPong:
355 case WebSocketProtocolComponent.BufferType.None:
356 bufferData = buffer.Data.BufferData;
357 bufferLength = buffer.Data.BufferLength;
358 break;
359 }
360 }

References System.buffer, and System.IntPtr.Zero.

Referenced by System.Net.WebSockets.WebSocketBuffer.ConvertCloseBuffer(), System.Net.WebSockets.WebSocketBuffer.ConvertNativeBuffer(), System.Net.WebSockets.WebSocketBuffer.ConvertPinnedSendPayloadFromNative(), System.Net.WebSockets.WebSocketBuffer.IsPinnedSendPayloadBuffer(), and System.Net.WebSockets.WebSocketBuffer.ValidateNativeBuffers().