using System; using System.Collections.Generic; using System.Net.WebSockets; using System.Runtime.CompilerServices; using System.Text; using System.Threading; using System.Threading.Tasks; using BestHTTP.Extensions; using BestHTTP.Logger; using Cpp2IlInjected; namespace BestHTTP.WebSocket { // Token: 0x020018AD RID: 6317 [Token(Token = "0x20018AD")] public class NativeWebSocket { // Token: 0x170017A9 RID: 6057 // (get) Token: 0x0600949D RID: 38045 RVA: 0x001E87DC File Offset: 0x001E69DC // (set) Token: 0x0600949E RID: 38046 RVA: 0x001E87F0 File Offset: 0x001E69F0 [Token(Token = "0x170017A9")] public WebSocketStates State { [Token(Token = "0x600949D")] [Address(RVA = "0x4363F0", Offset = "0x4351F0", VA = "0x1804363F0")] get; [Token(Token = "0x600949E")] [Address(RVA = "0x4366B0", Offset = "0x4354B0", VA = "0x1804366B0")] private set; } // Token: 0x0600949F RID: 38047 RVA: 0x001E8804 File Offset: 0x001E6A04 [Token(Token = "0x600949F")] [Address(RVA = "0x1C39C10", Offset = "0x1C38A10", VA = "0x181C39C10")] public NativeWebSocket(Uri uri) { int num; do { num = 0; this.State = (WebSocketStates)((ulong)4L); ClientWebSocket clientWebSocket = new ClientWebSocket(); this._webSocket = clientWebSocket; Queue queue = new Queue(); this._outboundMessageQueue = queue; List> list = new List(); this._inboundFrames = list; List list2 = new List(); this._rentedBuffers = list2; base..ctor(); bool flag = HTTPProtocolFactory.IsSecureProtocol(uri); string text = "ws"; if (flag) { text = "wss"; } if (uri.Port != -1) { int port = uri.Port; } bool flag2 = text.Equals("wss", StringComparison.OrdinalIgnoreCase); object[] array = new object[6]; if (text != 0) { } array[0] = text; if ("://" != 0) { } array[1] = "://"; string host = uri.Host; if (host != 0) { } array[2] = host; if (":" != 0) { } array[3] = ":"; if (":" != 0) { } array[4] = ":"; string requestPathAndQueryURL = uri.GetRequestPathAndQueryURL(); if (requestPathAndQueryURL != 0) { } array[5] = requestPathAndQueryURL; Uri uri2 = new Uri(string.Concat(array)); this._uri = uri2; if (!BPHGKAEDBPE.KNJJNNNAEKB(uri2)) { break; } NNMAGDKDBFN nnmagdkdbfn = MHOKOMMOGKM.DMIDMJAKAJD(); Encoding utf = Encoding.UTF8; string text3; string text2 = "Bearer " + text3; this._webSocket._options.SetRequestHeader("Authorization", text2); } while (num != 0); } // Token: 0x060094A0 RID: 38048 RVA: 0x001E897C File Offset: 0x001E6B7C [Token(Token = "0x60094A0")] [Address(RVA = "0x1C39BE0", Offset = "0x1C389E0", VA = "0x181C39BE0")] public void SetHeader(string name, string value) { this._webSocket._options.SetRequestHeader(name, value); } // Token: 0x060094A1 RID: 38049 RVA: 0x001E89A4 File Offset: 0x001E6BA4 [Token(Token = "0x60094A1")] [Address(RVA = "0x1C39220", Offset = "0x1C38020", VA = "0x181C39220")] public void Open() { Action defaultContextAction = AsyncVoidMethodBuilder.Create().m_coreState.m_defaultContextAction; } // Token: 0x060094A2 RID: 38050 RVA: 0x001E89C4 File Offset: 0x001E6BC4 [Token(Token = "0x60094A2")] [Address(RVA = "0x1C39160", Offset = "0x1C37F60", VA = "0x181C39160")] public void Close() { Action defaultContextAction = AsyncVoidMethodBuilder.Create().m_coreState.m_defaultContextAction; } // Token: 0x060094A3 RID: 38051 RVA: 0x001E89E4 File Offset: 0x001E6BE4 [Token(Token = "0x60094A3")] [Address(RVA = "0x1C39090", Offset = "0x1C37E90", VA = "0x181C39090")] private Task CloseInternal() { Task task; return task; } // Token: 0x060094A4 RID: 38052 RVA: 0x001E89F4 File Offset: 0x001E6BF4 [Token(Token = "0x60094A4")] [Address(RVA = "0x1C39A60", Offset = "0x1C38860", VA = "0x181C39A60")] public void Send(string message) { this._webSocket.Dispose(); Queue outboundMessageQueue = this._outboundMessageQueue; int num = 0; outboundMessageQueue.Enqueue(num); bool flag = this._outboundMessagePendingEvent.Set(); } // Token: 0x060094A5 RID: 38053 RVA: 0x001E8A30 File Offset: 0x001E6C30 [Token(Token = "0x60094A5")] [Address(RVA = "0x1C39B20", Offset = "0x1C38920", VA = "0x181C39B20")] public void Send(byte[] message) { this._webSocket.Dispose(); Queue outboundMessageQueue = this._outboundMessageQueue; bool flag = this._outboundMessagePendingEvent.Set(); } // Token: 0x060094A6 RID: 38054 RVA: 0x001E8A64 File Offset: 0x001E6C64 [Token(Token = "0x60094A6")] [Address(RVA = "0x1C39980", Offset = "0x1C38780", VA = "0x181C39980")] private Task SendLoop(CancellationToken cancellationToken) { Task task; return task; } // Token: 0x060094A7 RID: 38055 RVA: 0x001E8A74 File Offset: 0x001E6C74 [Token(Token = "0x60094A7")] [Address(RVA = "0x1C392D0", Offset = "0x1C380D0", VA = "0x181C392D0")] private Task ReceiveLoop() { Task task; return task; } // Token: 0x060094A8 RID: 38056 RVA: 0x001E8A84 File Offset: 0x001E6C84 [Token(Token = "0x60094A8")] [Address(RVA = "0x1C393A0", Offset = "0x1C381A0", VA = "0x181C393A0")] private Task Receive() { AsyncTaskMethodBuilder asyncTaskMethodBuilder = AsyncTaskMethodBuilder.Create(); Task task; return task; } // Token: 0x060094A9 RID: 38057 RVA: 0x001E8AA0 File Offset: 0x001E6CA0 [Token(Token = "0x60094A9")] [Address(RVA = "0x1C398C0", Offset = "0x1C386C0", VA = "0x181C398C0")] private void SafeRaiseOnOpen() { NativeWebSocket.OnWebSocketOpenDelegate onOpen = this.OnOpen; if (onOpen != 0) { onOpen(this); } ILogger logger = HTTPManager.Logger; } // Token: 0x060094AA RID: 38058 RVA: 0x001E8AD0 File Offset: 0x001E6CD0 [Token(Token = "0x60094AA")] [Address(RVA = "0x1C397F0", Offset = "0x1C385F0", VA = "0x181C397F0")] private void SafeRaiseOnMessage(string message) { NativeWebSocket.OnWebSocketMessageDelegate onMessage = this.OnMessage; if (onMessage != 0) { onMessage(this, message); } ILogger logger = HTTPManager.Logger; } // Token: 0x060094AB RID: 38059 RVA: 0x001E8B00 File Offset: 0x001E6D00 [Token(Token = "0x60094AB")] [Address(RVA = "0x1C39490", Offset = "0x1C38290", VA = "0x181C39490")] private void SafeRaiseOnBinary(byte[] message) { NativeWebSocket.OnWebSocketBinaryDelegate onBinary = this.OnBinary; if (onBinary != 0) { onBinary(this, message); } ILogger logger = HTTPManager.Logger; } // Token: 0x060094AC RID: 38060 RVA: 0x001E8B30 File Offset: 0x001E6D30 [Token(Token = "0x60094AC")] [Address(RVA = "0x1C39560", Offset = "0x1C38360", VA = "0x181C39560")] private void SafeRaiseOnClosed(ushort statusCode, string statusMessage) { NativeWebSocket.OnWebSocketClosedDelegate onClosed = this.OnClosed; if (onClosed != 0) { onClosed(this, statusCode, statusMessage); } ILogger logger = HTTPManager.Logger; } // Token: 0x060094AD RID: 38061 RVA: 0x001E8B60 File Offset: 0x001E6D60 [Token(Token = "0x60094AD")] [Address(RVA = "0x1C39720", Offset = "0x1C38520", VA = "0x181C39720")] private void SafeRaiseOnError(Exception exception) { NativeWebSocket.OnWebSocketErrorDelegate onError = this.OnError; if (onError != 0) { onError(this, exception); } ILogger logger = HTTPManager.Logger; } // Token: 0x060094AE RID: 38062 RVA: 0x001E8B90 File Offset: 0x001E6D90 [Token(Token = "0x60094AE")] [Address(RVA = "0x1C39650", Offset = "0x1C38450", VA = "0x181C39650")] private void SafeRaiseOnErrorDesc(string errorDescription) { NativeWebSocket.OnWebSocketErrorDescriptionDelegate onErrorDesc = this.OnErrorDesc; if (onErrorDesc != 0) { onErrorDesc(this, errorDescription); } ILogger logger = HTTPManager.Logger; } // Token: 0x0400654C RID: 25932 [Token(Token = "0x400654C")] private const int MaxFragmentSize = 32767; // Token: 0x0400654D RID: 25933 [FieldOffset(Offset = "0x10")] [Token(Token = "0x400654D")] public NativeWebSocket.OnWebSocketOpenDelegate OnOpen; // Token: 0x0400654E RID: 25934 [FieldOffset(Offset = "0x18")] [Token(Token = "0x400654E")] public NativeWebSocket.OnWebSocketMessageDelegate OnMessage; // Token: 0x0400654F RID: 25935 [FieldOffset(Offset = "0x20")] [Token(Token = "0x400654F")] public NativeWebSocket.OnWebSocketBinaryDelegate OnBinary; // Token: 0x04006550 RID: 25936 [FieldOffset(Offset = "0x28")] [Token(Token = "0x4006550")] public NativeWebSocket.OnWebSocketClosedDelegate OnClosed; // Token: 0x04006551 RID: 25937 [FieldOffset(Offset = "0x30")] [Token(Token = "0x4006551")] public NativeWebSocket.OnWebSocketErrorDelegate OnError; // Token: 0x04006552 RID: 25938 [FieldOffset(Offset = "0x38")] [Token(Token = "0x4006552")] public NativeWebSocket.OnWebSocketErrorDescriptionDelegate OnErrorDesc; // Token: 0x04006554 RID: 25940 [FieldOffset(Offset = "0x48")] [Token(Token = "0x4006554")] private readonly Uri _uri; // Token: 0x04006555 RID: 25941 [FieldOffset(Offset = "0x50")] [Token(Token = "0x4006555")] private readonly ClientWebSocket _webSocket; // Token: 0x04006556 RID: 25942 [FieldOffset(Offset = "0x58")] [Token(Token = "0x4006556")] private readonly Queue _outboundMessageQueue; // Token: 0x04006557 RID: 25943 [FieldOffset(Offset = "0x60")] [Token(Token = "0x4006557")] private readonly List> _inboundFrames; // Token: 0x04006558 RID: 25944 [FieldOffset(Offset = "0x68")] [Token(Token = "0x4006558")] private readonly List _rentedBuffers; // Token: 0x04006559 RID: 25945 [FieldOffset(Offset = "0x70")] [Token(Token = "0x4006559")] private CancellationTokenSource _sendLoopCancellationTokenSource; // Token: 0x0400655A RID: 25946 [FieldOffset(Offset = "0x78")] [Token(Token = "0x400655A")] private AutoResetEvent _outboundMessagePendingEvent; // Token: 0x020018AE RID: 6318 [Token(Token = "0x20018AE")] private struct OutboundMessage { // Token: 0x060094AF RID: 38063 RVA: 0x001E8BC0 File Offset: 0x001E6DC0 [Token(Token = "0x60094AF")] [Address(RVA = "0x1C3B8C0", Offset = "0x1C3A6C0", VA = "0x181C3B8C0")] public OutboundMessage(byte[] binaryMessage) { this.BinaryMessage = binaryMessage; this.TextMessage = (ulong)0L; } // Token: 0x060094B0 RID: 38064 RVA: 0x001E8BE0 File Offset: 0x001E6DE0 [Token(Token = "0x60094B0")] [Address(RVA = "0x1C3B8E0", Offset = "0x1C3A6E0", VA = "0x181C3B8E0")] public OutboundMessage(string textMessage) { int num = 0; this.TextMessage = textMessage; this.MessageType = (WebSocketMessageType)num; this.BinaryMessage = num; } // Token: 0x0400655B RID: 25947 [FieldOffset(Offset = "0x0")] [Token(Token = "0x400655B")] public readonly WebSocketMessageType MessageType; // Token: 0x0400655C RID: 25948 [FieldOffset(Offset = "0x8")] [Token(Token = "0x400655C")] public readonly byte[] BinaryMessage; // Token: 0x0400655D RID: 25949 [FieldOffset(Offset = "0x10")] [Token(Token = "0x400655D")] public readonly string TextMessage; } // Token: 0x020018AF RID: 6319 [Token(Token = "0x20018AF")] private struct InboundMessage { // Token: 0x060094B1 RID: 38065 RVA: 0x001E8C04 File Offset: 0x001E6E04 [Token(Token = "0x60094B1")] [Address(RVA = "0x1C37E70", Offset = "0x1C36C70", VA = "0x181C37E70")] public InboundMessage(byte[] binaryMessage) { this.BinaryMessage = binaryMessage; int num = 0; int num2 = 0; this.TextMessage = num2; this.CloseStatus = num; this.CloseStatusDescription = num2; } // Token: 0x060094B2 RID: 38066 RVA: 0x001E8C34 File Offset: 0x001E6E34 [Token(Token = "0x60094B2")] [Address(RVA = "0x1C37E50", Offset = "0x1C36C50", VA = "0x181C37E50")] public InboundMessage(string textMessage) { int num = 0; this.TextMessage = textMessage; int num2 = 0; this.MessageType = (WebSocketMessageType)num; this.BinaryMessage = num; this.CloseStatus = num2; this.CloseStatusDescription = num; } // Token: 0x060094B3 RID: 38067 RVA: 0x001E8C68 File Offset: 0x001E6E68 [Token(Token = "0x60094B3")] [Address(RVA = "0x1C37E90", Offset = "0x1C36C90", VA = "0x181C37E90")] public InboundMessage(WebSocketCloseStatus? closeStatus, string closeStatusDescription) { int num = 0; this.BinaryMessage = num; this.TextMessage = num; this.CloseStatus = closeStatus; this.CloseStatusDescription = closeStatusDescription; } // Token: 0x0400655E RID: 25950 [FieldOffset(Offset = "0x0")] [Token(Token = "0x400655E")] public readonly WebSocketMessageType MessageType; // Token: 0x0400655F RID: 25951 [FieldOffset(Offset = "0x8")] [Token(Token = "0x400655F")] public readonly byte[] BinaryMessage; // Token: 0x04006560 RID: 25952 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4006560")] public readonly string TextMessage; // Token: 0x04006561 RID: 25953 [FieldOffset(Offset = "0x18")] [Token(Token = "0x4006561")] public readonly WebSocketCloseStatus? CloseStatus; // Token: 0x04006562 RID: 25954 [FieldOffset(Offset = "0x20")] [Token(Token = "0x4006562")] public readonly string CloseStatusDescription; } // Token: 0x020018B0 RID: 6320 [Token(Token = "0x20018B0")] public sealed class OnWebSocketOpenDelegate : MulticastDelegate { // Token: 0x060094B4 RID: 38068 RVA: 0x001E8C94 File Offset: 0x001E6E94 [Token(Token = "0x60094B4")] [Address(RVA = "0x448ED0", Offset = "0x447CD0", VA = "0x180448ED0")] public OnWebSocketOpenDelegate(object @object, IntPtr method) { this.method = method; this.m_target = @object; } // Token: 0x060094B5 RID: 38069 RVA: 0x001E8CB0 File Offset: 0x001E6EB0 [Token(Token = "0x60094B5")] [Address(RVA = "0x747410", Offset = "0x746210", VA = "0x180747410", Slot = "13")] public void Invoke(NativeWebSocket webSocket) { if (this.delegates != 0) { } uint num; if (num != (uint)0) { throw new ExecutionEngineException(); } } // Token: 0x060094B6 RID: 38070 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60094B6")] [Address(RVA = "0x457150", Offset = "0x455F50", VA = "0x180457150", Slot = "14")] public IAsyncResult BeginInvoke(NativeWebSocket webSocket, AsyncCallback callback, object @object) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x060094B7 RID: 38071 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60094B7")] [Address(RVA = "0x448B70", Offset = "0x447970", VA = "0x180448B70", Slot = "15")] public void EndInvoke(IAsyncResult result) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } } // Token: 0x020018B1 RID: 6321 [Token(Token = "0x20018B1")] public sealed class OnWebSocketMessageDelegate : MulticastDelegate { // Token: 0x060094B8 RID: 38072 RVA: 0x001E8D64 File Offset: 0x001E6F64 [Token(Token = "0x60094B8")] [Address(RVA = "0x448ED0", Offset = "0x447CD0", VA = "0x180448ED0")] public OnWebSocketMessageDelegate(object @object, IntPtr method) { this.method = method; this.m_target = @object; } // Token: 0x060094B9 RID: 38073 RVA: 0x001E8D80 File Offset: 0x001E6F80 [Token(Token = "0x60094B9")] [Address(RVA = "0x5F71E0", Offset = "0x5F5FE0", VA = "0x1805F71E0", Slot = "13")] public void Invoke(NativeWebSocket webSocket, string message) { if (this.delegates != 0) { } uint num; if (num != (uint)0) { throw new ExecutionEngineException(); } } // Token: 0x060094BA RID: 38074 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60094BA")] [Address(RVA = "0x457420", Offset = "0x456220", VA = "0x180457420", Slot = "14")] public IAsyncResult BeginInvoke(NativeWebSocket webSocket, string message, AsyncCallback callback, object @object) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x060094BB RID: 38075 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60094BB")] [Address(RVA = "0x448B70", Offset = "0x447970", VA = "0x180448B70", Slot = "15")] public void EndInvoke(IAsyncResult result) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } } // Token: 0x020018B2 RID: 6322 [Token(Token = "0x20018B2")] public sealed class OnWebSocketBinaryDelegate : MulticastDelegate { // Token: 0x060094BC RID: 38076 RVA: 0x001E8E00 File Offset: 0x001E7000 [Token(Token = "0x60094BC")] [Address(RVA = "0x448ED0", Offset = "0x447CD0", VA = "0x180448ED0")] public OnWebSocketBinaryDelegate(object @object, IntPtr method) { this.method = method; this.m_target = @object; } // Token: 0x060094BD RID: 38077 RVA: 0x001E8E1C File Offset: 0x001E701C [Token(Token = "0x60094BD")] [Address(RVA = "0x1C3A8C0", Offset = "0x1C396C0", VA = "0x181C3A8C0", Slot = "13")] public void Invoke(NativeWebSocket webSocket, byte[] data) { if (this.delegates != 0) { } uint num; if (num != (uint)0) { throw new ExecutionEngineException(); } } // Token: 0x060094BE RID: 38078 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60094BE")] [Address(RVA = "0x457420", Offset = "0x456220", VA = "0x180457420", Slot = "14")] public IAsyncResult BeginInvoke(NativeWebSocket webSocket, byte[] data, AsyncCallback callback, object @object) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x060094BF RID: 38079 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60094BF")] [Address(RVA = "0x448B70", Offset = "0x447970", VA = "0x180448B70", Slot = "15")] public void EndInvoke(IAsyncResult result) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } } // Token: 0x020018B3 RID: 6323 [Token(Token = "0x20018B3")] public sealed class OnWebSocketClosedDelegate : MulticastDelegate { // Token: 0x060094C0 RID: 38080 RVA: 0x001E8EE4 File Offset: 0x001E70E4 [Token(Token = "0x60094C0")] [Address(RVA = "0x448ED0", Offset = "0x447CD0", VA = "0x180448ED0")] public OnWebSocketClosedDelegate(object @object, IntPtr method) { this.method = method; this.m_target = @object; } // Token: 0x060094C1 RID: 38081 RVA: 0x001E8F00 File Offset: 0x001E7100 [Token(Token = "0x60094C1")] [Address(RVA = "0x1C3ADB0", Offset = "0x1C39BB0", VA = "0x181C3ADB0", Slot = "13")] public void Invoke(NativeWebSocket webSocket, ushort code, string message) { if (this.delegates != 0) { } uint num; if (num != (uint)0) { throw new ExecutionEngineException(); } } // Token: 0x060094C2 RID: 38082 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60094C2")] [Address(RVA = "0x1C3AC70", Offset = "0x1C39A70", VA = "0x181C3AC70", Slot = "14")] public IAsyncResult BeginInvoke(NativeWebSocket webSocket, ushort code, string message, AsyncCallback callback, object @object) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x060094C3 RID: 38083 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60094C3")] [Address(RVA = "0x448B70", Offset = "0x447970", VA = "0x180448B70", Slot = "15")] public void EndInvoke(IAsyncResult result) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } } // Token: 0x020018B4 RID: 6324 [Token(Token = "0x20018B4")] public sealed class OnWebSocketErrorDelegate : MulticastDelegate { // Token: 0x060094C4 RID: 38084 RVA: 0x001E8FA4 File Offset: 0x001E71A4 [Token(Token = "0x60094C4")] [Address(RVA = "0x448ED0", Offset = "0x447CD0", VA = "0x180448ED0")] public OnWebSocketErrorDelegate(object @object, IntPtr method) { this.method = method; this.m_target = @object; } // Token: 0x060094C5 RID: 38085 RVA: 0x001E8FC0 File Offset: 0x001E71C0 [Token(Token = "0x60094C5")] [Address(RVA = "0x1C3A8C0", Offset = "0x1C396C0", VA = "0x181C3A8C0", Slot = "13")] public void Invoke(NativeWebSocket webSocket, Exception ex) { if (this.delegates != 0) { } uint num; if (num != (uint)0) { throw new ExecutionEngineException(); } } // Token: 0x060094C6 RID: 38086 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60094C6")] [Address(RVA = "0x457420", Offset = "0x456220", VA = "0x180457420", Slot = "14")] public IAsyncResult BeginInvoke(NativeWebSocket webSocket, Exception ex, AsyncCallback callback, object @object) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x060094C7 RID: 38087 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60094C7")] [Address(RVA = "0x448B70", Offset = "0x447970", VA = "0x180448B70", Slot = "15")] public void EndInvoke(IAsyncResult result) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } } // Token: 0x020018B5 RID: 6325 [Token(Token = "0x20018B5")] public sealed class OnWebSocketErrorDescriptionDelegate : MulticastDelegate { // Token: 0x060094C8 RID: 38088 RVA: 0x001E9084 File Offset: 0x001E7284 [Token(Token = "0x60094C8")] [Address(RVA = "0x448ED0", Offset = "0x447CD0", VA = "0x180448ED0")] public OnWebSocketErrorDescriptionDelegate(object @object, IntPtr method) { this.method = method; this.m_target = @object; } // Token: 0x060094C9 RID: 38089 RVA: 0x001E90A0 File Offset: 0x001E72A0 [Token(Token = "0x60094C9")] [Address(RVA = "0x5F71E0", Offset = "0x5F5FE0", VA = "0x1805F71E0", Slot = "13")] public void Invoke(NativeWebSocket webSocket, string reason) { if (this.delegates != 0) { } uint num; if (num != (uint)0) { throw new ExecutionEngineException(); } } // Token: 0x060094CA RID: 38090 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60094CA")] [Address(RVA = "0x457420", Offset = "0x456220", VA = "0x180457420", Slot = "14")] public IAsyncResult BeginInvoke(NativeWebSocket webSocket, string reason, AsyncCallback callback, object @object) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x060094CB RID: 38091 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60094CB")] [Address(RVA = "0x448B70", Offset = "0x447970", VA = "0x180448B70", Slot = "15")] public void EndInvoke(IAsyncResult result) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } } // Token: 0x020018B6 RID: 6326 [Token(Token = "0x20018B6")] public static class WaitHandleAsyncFactory { // Token: 0x060094CC RID: 38092 RVA: 0x001E9120 File Offset: 0x001E7320 [Token(Token = "0x60094CC")] [Address(RVA = "0x1C40550", Offset = "0x1C3F350", VA = "0x181C40550")] public static Task FromWaitHandle(WaitHandle handle) { } // Token: 0x060094CD RID: 38093 RVA: 0x001E9130 File Offset: 0x001E7330 [Token(Token = "0x60094CD")] [Address(RVA = "0x1C401E0", Offset = "0x1C3EFE0", VA = "0x181C401E0")] public static Task FromWaitHandle(WaitHandle handle, TimeSpan timeout) { Task task; return task; } // Token: 0x060094CE RID: 38094 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60094CE")] [Address(RVA = "0x1C40140", Offset = "0x1C3EF40", VA = "0x181C40140")] public static Task FromWaitHandle(WaitHandle handle, CancellationToken token) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x060094CF RID: 38095 RVA: 0x001E9140 File Offset: 0x001E7340 [Token(Token = "0x60094CF")] [Address(RVA = "0x1C40280", Offset = "0x1C3F080", VA = "0x181C40280")] public static Task FromWaitHandle(WaitHandle handle, TimeSpan timeout, CancellationToken token) { /* An exception occurred when decompiling this method (060094CF) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Threading.Tasks.Task`1 BestHTTP.WebSocket.NativeWebSocket/WaitHandleAsyncFactory::FromWaitHandle(System.Threading.WaitHandle,System.TimeSpan,System.Threading.CancellationToken) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_3D: stloc:ArgumentNullException(var_8_47, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("handle"))) } at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88 --- End of inner exception stack trace --- at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660 */; } // Token: 0x060094D0 RID: 38096 RVA: 0x001E9198 File Offset: 0x001E7398 [Token(Token = "0x60094D0")] [Address(RVA = "0x1C40040", Offset = "0x1C3EE40", VA = "0x181C40040")] private static Task DoFromWaitHandle(WaitHandle handle, TimeSpan timeout, CancellationToken token) { AsyncTaskMethodBuilder asyncTaskMethodBuilder = AsyncTaskMethodBuilder.Create(); Task task; return task; } // Token: 0x060094D1 RID: 38097 RVA: 0x001E91B0 File Offset: 0x001E73B0 // Note: this type is marked as 'beforefieldinit'. [Token(Token = "0x60094D1")] [Address(RVA = "0x1C40620", Offset = "0x1C3F420", VA = "0x181C40620")] static WaitHandleAsyncFactory() { Task task = Task.FromResult(true); int num = 0; NativeWebSocket.WaitHandleAsyncFactory.CompletedTaskTrue = task; NativeWebSocket.WaitHandleAsyncFactory.CompletedTaskFalse = Task.FromResult(num != 0); Task task2; NativeWebSocket.WaitHandleAsyncFactory.CancelledTask = task2; } // Token: 0x04006563 RID: 25955 [Token(Token = "0x4006563")] private static Task CompletedTaskTrue; // Token: 0x04006564 RID: 25956 [Token(Token = "0x4006564")] private static Task CompletedTaskFalse; // Token: 0x04006565 RID: 25957 [Token(Token = "0x4006565")] private static Task CancelledTask; // Token: 0x020018B7 RID: 6327 [Token(Token = "0x20018B7")] private sealed class ThreadPoolRegistration : IDisposable { // Token: 0x060094D2 RID: 38098 RVA: 0x000396E2 File Offset: 0x000378E2 [Token(Token = "0x60094D2")] [Address(RVA = "0x1C3CFA0", Offset = "0x1C3BDA0", VA = "0x181C3CFA0")] public ThreadPoolRegistration(WaitHandle handle, TimeSpan timeout, TaskCompletionSource tcs) { } // Token: 0x060094D3 RID: 38099 RVA: 0x000396E2 File Offset: 0x000378E2 [Token(Token = "0x60094D3")] [Address(RVA = "0x1C3CF70", Offset = "0x1C3BD70", VA = "0x181C3CF70", Slot = "4")] void IDisposable.Dispose() { } // Token: 0x04006566 RID: 25958 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4006566")] private readonly RegisteredWaitHandle _registeredWaitHandle; } } } }