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

◆ IOCompleted() [1/2]

static unsafe void System.Net.HttpResponseStreamAsyncResult.IOCompleted ( HttpResponseStreamAsyncResult asyncResult,
uint errorCode,
uint numBytes )
inlinestaticprivate

Definition at line 142 of file HttpResponseStreamAsyncResult.cs.

143 {
144 if (System.Net.NetEventSource.Log.IsEnabled())
145 {
146 System.Net.NetEventSource.Info(null, $"errorCode:0x{errorCode:x8} numBytes: {numBytes}", "IOCompleted");
147 }
148 object obj = null;
149 try
150 {
151 if (errorCode != 0 && errorCode != 38)
152 {
153 asyncResult.ErrorCode = (int)errorCode;
154 obj = new HttpListenerException((int)errorCode);
155 }
156 else if (asyncResult._dataChunks == null)
157 {
158 obj = 0u;
159 if (System.Net.NetEventSource.Log.IsEnabled())
160 {
161 System.Net.NetEventSource.DumpBuffer(null, IntPtr.Zero, 0, "IOCompleted");
162 }
163 }
164 else
165 {
166 obj = ((asyncResult._dataChunks.Length == 1) ? asyncResult._dataChunks[0].BufferLength : 0u);
167 if (System.Net.NetEventSource.Log.IsEnabled())
168 {
169 for (int i = 0; i < asyncResult._dataChunks.Length; i++)
170 {
171 System.Net.NetEventSource.DumpBuffer(null, (IntPtr)asyncResult._dataChunks[0].pBuffer, (int)asyncResult._dataChunks[0].BufferLength, "IOCompleted");
172 }
173 }
174 }
175 if (System.Net.NetEventSource.Log.IsEnabled())
176 {
177 System.Net.NetEventSource.Info(null, "Calling Complete()", "IOCompleted");
178 }
179 }
180 catch (Exception ex)
181 {
182 obj = ex;
183 }
184 asyncResult.InvokeCallback(obj);
185 }
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)

References System.asyncResult, System.Net.NetEventSource.DumpBuffer(), System.Net.NetEventSource.Info(), System.Net.NetEventSource.Log, System.obj, and System.IntPtr.Zero.