12 private readonly global::Interop.HttpApi.HTTP_DATA_CHUNK[]
_dataChunks;
18 private static readonly
byte[]
s_CRLFArray =
new byte[2] { 13, 10 };
32 internal unsafe global::Interop.HttpApi.HTTP_DATA_CHUNK*
pDataChunks
45 : base(asyncObject, userState, callback)
51 uint num = 4026531840u;
52 byte[]
array =
new byte[10];
57 if (
offset != -1 || (size & num) != 0
L)
59 uint num3 = (uint)size >> 28;
62 array[num2] = (byte)(num3 + 48);
66 array[num2] = (byte)(num3 - 10 + 65);
82 : base(asyncObject, userState, callback)
92 _dataChunks =
new global::Interop.HttpApi.HTTP_DATA_CHUNK[(!chunked) ? 1 : 3];
100 byte[] array2 =
null;
104 _dataChunks[0] =
default(global::Interop.HttpApi.HTTP_DATA_CHUNK);
105 _dataChunks[0].DataChunkType = global::Interop.HttpApi.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
106 _dataChunks[0].BufferLength = (uint)(array2.Length - offset2);
108 _dataChunks[1] =
default(global::Interop.HttpApi.HTTP_DATA_CHUNK);
109 _dataChunks[1].DataChunkType = global::Interop.HttpApi.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
112 _dataChunks[2] =
default(global::Interop.HttpApi.HTTP_DATA_CHUNK);
113 _dataChunks[2].DataChunkType = global::Interop.HttpApi.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
119 _dataChunks[0] =
default(global::Interop.HttpApi.HTTP_DATA_CHUNK);
120 _dataChunks[0].DataChunkType = global::Interop.HttpApi.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
151 if (errorCode != 0 && errorCode != 38)
153 asyncResult.ErrorCode = (int)errorCode;
166 obj = ((asyncResult._dataChunks.Length == 1) ?
asyncResult._dataChunks[0].BufferLength : 0u);
169 for (
int i = 0; i <
asyncResult._dataChunks.Length; i++)
193 System.
Net.
NetEventSource.
Info(
null,
"errorCode:0x" + errorCode.ToString(
"x8") +
" numBytes:" + numBytes +
" nativeOverlapped:0x" + ((
IntPtr)nativeOverlapped).ToString(
"x8"),
"Callback");
static unsafe readonly IOCompletionCallback s_IOCallback
unsafe HttpResponseStreamAsyncResult(object asyncObject, object userState, AsyncCallback callback, byte[] buffer, int offset, int size, bool chunked, bool sentHeaders, ThreadPoolBoundHandle boundHandle)
unsafe NativeOverlapped * _pOverlapped
HttpResponseStreamAsyncResult(object asyncObject, object userState, AsyncCallback callback)
static readonly byte[] s_CRLFArray
static unsafe void IOCompleted(HttpResponseStreamAsyncResult asyncResult, uint errorCode, uint numBytes)
static unsafe void Callback(uint errorCode, uint numBytes, NativeOverlapped *nativeOverlapped)
unsafe override void Cleanup()
unsafe global::Interop.HttpApi.HTTP_DATA_CHUNK * pDataChunks
readonly global::Interop.HttpApi.HTTP_DATA_CHUNK[] _dataChunks
static byte[] GetChunkHeader(int size, out int offset)
readonly ThreadPoolBoundHandle _boundHandle
void IOCompleted(uint errorCode, uint numBytes)
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static void DumpBuffer(object thisOrContextObject, byte[] buffer, int offset, int count, [CallerMemberName] string memberName=null)
static unsafe IntPtr UnsafeAddrOfPinnedArrayElement(Array arr, int index)
unsafe void FreeNativeOverlapped(NativeOverlapped *overlapped)
unsafe NativeOverlapped * AllocateNativeOverlapped(IOCompletionCallback callback, object? state, object? pinData)
static unsafe? object GetNativeOverlappedState(NativeOverlapped *overlapped)
unsafe delegate void IOCompletionCallback(uint errorCode, uint numBytes, NativeOverlapped *pOVERLAP)
static readonly IntPtr Zero