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

◆ IOCompleted() [1/2]

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

Definition at line 48 of file HttpRequestStream.cs.

49 {
50 if (System.Net.NetEventSource.Log.IsEnabled())
51 {
52 System.Net.NetEventSource.Info(null, $"asyncResult: {asyncResult} errorCode:0x {errorCode:x8} numBytes: {numBytes}", "IOCompleted");
53 }
54 object obj = null;
55 try
56 {
57 if (errorCode != 0 && errorCode != 38)
58 {
59 asyncResult.ErrorCode = (int)errorCode;
60 obj = new HttpListenerException((int)errorCode);
61 }
62 else
63 {
64 obj = numBytes;
65 if (System.Net.NetEventSource.Log.IsEnabled())
66 {
67 System.Net.NetEventSource.DumpBuffer(asyncResult, (IntPtr)asyncResult._pPinnedBuffer, (int)numBytes, "IOCompleted");
68 }
69 }
70 if (System.Net.NetEventSource.Log.IsEnabled())
71 {
72 System.Net.NetEventSource.Info(null, $"asyncResult: {asyncResult} calling Complete()", "IOCompleted");
73 }
74 }
75 catch (Exception ex)
76 {
77 obj = ex;
78 }
79 asyncResult.InvokeCallback(obj);
80 }
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, and System.obj.