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

◆ UnsafeFlush()

unsafe int System.Net.WebSockets.Compression.WebSocketDeflater.UnsafeFlush ( Span< byte > output,
out bool needsMoreBuffer )
inlineprivate

Definition at line 115 of file WebSocketDeflater.cs.

116 {
117 fixed (byte* ptr = output)
118 {
119 _stream.NextIn = IntPtr.Zero;
120 _stream.AvailIn = 0u;
121 _stream.NextOut = (IntPtr)ptr;
122 _stream.AvailOut = (uint)output.Length;
124 needsMoreBuffer = _stream.AvailOut < 6;
125 if (!needsMoreBuffer)
126 {
127 errorCode = Deflate(_stream, ZLibNative.FlushCode.SyncFlush);
128 }
129 return output.Length - (int)_stream.AvailOut;
130 }
131 }
int Length
Definition Span.cs:70

References System.Net.WebSockets.Compression.WebSocketDeflater._stream, System.Net.Deflate, System.Span< T >.Length, and System.IntPtr.Zero.

Referenced by System.Net.WebSockets.Compression.WebSocketDeflater.DeflatePrivate().