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 System.Xml.Schema; using BestHTTP.Extensions; using BestHTTP.Logger; using Cpp2IlInjected; namespace BestHTTP.WebSocket { // Token: 0x0200198D RID: 6541 [Token(Token = "0x200198D")] public class NativeWebSocket { // Token: 0x17001846 RID: 6214 // (get) Token: 0x0600986B RID: 39019 RVA: 0x001F1878 File Offset: 0x001EFA78 // (set) Token: 0x0600986C RID: 39020 RVA: 0x001F188C File Offset: 0x001EFA8C [Token(Token = "0x17001846")] public WebSocketStates State { [Token(Token = "0x600986B")] [Address(RVA = "0x41CF00", Offset = "0x41BF00", VA = "0x18041CF00")] get; [Token(Token = "0x600986C")] [Address(RVA = "0x41D000", Offset = "0x41C000", VA = "0x18041D000")] private set; } // Token: 0x0600986D RID: 39021 RVA: 0x001F18A0 File Offset: 0x001EFAA0 [Token(Token = "0x600986D")] [Address(RVA = "0x62CB90", Offset = "0x62BB90", VA = "0x18062CB90")] 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: 0x0600986E RID: 39022 RVA: 0x001F1A18 File Offset: 0x001EFC18 [Token(Token = "0x600986E")] [Address(RVA = "0x62CB60", Offset = "0x62BB60", VA = "0x18062CB60")] public void SetHeader(string name, string value) { this._webSocket._options.SetRequestHeader(name, value); } // Token: 0x0600986F RID: 39023 RVA: 0x001F1A40 File Offset: 0x001EFC40 [Token(Token = "0x600986F")] [Address(RVA = "0x62C1A0", Offset = "0x62B1A0", VA = "0x18062C1A0")] public void Open() { Action defaultContextAction = AsyncVoidMethodBuilder.Create().m_coreState.m_defaultContextAction; } // Token: 0x06009870 RID: 39024 RVA: 0x001F1A60 File Offset: 0x001EFC60 [Token(Token = "0x6009870")] [Address(RVA = "0x62C0E0", Offset = "0x62B0E0", VA = "0x18062C0E0")] public void Close() { Action defaultContextAction = AsyncVoidMethodBuilder.Create().m_coreState.m_defaultContextAction; } // Token: 0x06009871 RID: 39025 RVA: 0x001F1A80 File Offset: 0x001EFC80 [Token(Token = "0x6009871")] [Address(RVA = "0x62C010", Offset = "0x62B010", VA = "0x18062C010")] private Task CloseInternal() { Task task; return task; } // Token: 0x06009872 RID: 39026 RVA: 0x001F1A90 File Offset: 0x001EFC90 [Token(Token = "0x6009872")] [Address(RVA = "0x62C9E0", Offset = "0x62B9E0", VA = "0x18062C9E0")] public void Send(string message) { this._webSocket.Dispose(); Queue outboundMessageQueue = this._outboundMessageQueue; int num = 0; outboundMessageQueue.Enqueue(num); bool flag = this._outboundMessagePendingEvent.Set(); } // Token: 0x06009873 RID: 39027 RVA: 0x001F1ACC File Offset: 0x001EFCCC [Token(Token = "0x6009873")] [Address(RVA = "0x62CAA0", Offset = "0x62BAA0", VA = "0x18062CAA0")] public void Send(byte[] message) { this._webSocket.Dispose(); Queue outboundMessageQueue = this._outboundMessageQueue; bool flag = this._outboundMessagePendingEvent.Set(); } // Token: 0x06009874 RID: 39028 RVA: 0x001F1B00 File Offset: 0x001EFD00 [Token(Token = "0x6009874")] [Address(RVA = "0x62C900", Offset = "0x62B900", VA = "0x18062C900")] private Task SendLoop(CancellationToken cancellationToken) { Task task; return task; } // Token: 0x06009875 RID: 39029 RVA: 0x001F1B10 File Offset: 0x001EFD10 [Token(Token = "0x6009875")] [Address(RVA = "0x62C250", Offset = "0x62B250", VA = "0x18062C250")] private Task ReceiveLoop() { Task task; return task; } // Token: 0x06009876 RID: 39030 RVA: 0x001F1B20 File Offset: 0x001EFD20 [Token(Token = "0x6009876")] [Address(RVA = "0x62C320", Offset = "0x62B320", VA = "0x18062C320")] private Task Receive() { AsyncTaskMethodBuilder asyncTaskMethodBuilder = AsyncTaskMethodBuilder.Create(); Task task; return task; } // Token: 0x06009877 RID: 39031 RVA: 0x001F1B3C File Offset: 0x001EFD3C [Token(Token = "0x6009877")] [Address(RVA = "0x62C840", Offset = "0x62B840", VA = "0x18062C840")] private void SafeRaiseOnOpen() { NativeWebSocket.OnWebSocketOpenDelegate onOpen = this.OnOpen; if (onOpen != 0) { onOpen(this); } ILogger logger = HTTPManager.Logger; } // Token: 0x06009878 RID: 39032 RVA: 0x001F1B6C File Offset: 0x001EFD6C [Token(Token = "0x6009878")] [Address(RVA = "0x62C770", Offset = "0x62B770", VA = "0x18062C770")] private void SafeRaiseOnMessage(string message) { NativeWebSocket.OnWebSocketMessageDelegate onMessage = this.OnMessage; if (onMessage != 0) { onMessage(this, message); } ILogger logger = HTTPManager.Logger; } // Token: 0x06009879 RID: 39033 RVA: 0x001F1B9C File Offset: 0x001EFD9C [Token(Token = "0x6009879")] [Address(RVA = "0x62C410", Offset = "0x62B410", VA = "0x18062C410")] private void SafeRaiseOnBinary(byte[] message) { NativeWebSocket.OnWebSocketBinaryDelegate onBinary = this.OnBinary; if (onBinary != 0) { onBinary(this, message); } ILogger logger = HTTPManager.Logger; } // Token: 0x0600987A RID: 39034 RVA: 0x001F1BCC File Offset: 0x001EFDCC [Token(Token = "0x600987A")] [Address(RVA = "0x62C4E0", Offset = "0x62B4E0", VA = "0x18062C4E0")] private void SafeRaiseOnClosed(ushort statusCode, string statusMessage) { NativeWebSocket.OnWebSocketClosedDelegate onClosed = this.OnClosed; if (onClosed != 0) { onClosed(this, statusCode, statusMessage); } ILogger logger = HTTPManager.Logger; } // Token: 0x0600987B RID: 39035 RVA: 0x001F1BFC File Offset: 0x001EFDFC [Token(Token = "0x600987B")] [Address(RVA = "0x62C6A0", Offset = "0x62B6A0", VA = "0x18062C6A0")] private void SafeRaiseOnError(Exception exception) { NativeWebSocket.OnWebSocketErrorDelegate onError = this.OnError; if (onError != 0) { onError(this, exception); } ILogger logger = HTTPManager.Logger; } // Token: 0x0600987C RID: 39036 RVA: 0x001F1C2C File Offset: 0x001EFE2C [Token(Token = "0x600987C")] [Address(RVA = "0x62C5D0", Offset = "0x62B5D0", VA = "0x18062C5D0")] private void SafeRaiseOnErrorDesc(string errorDescription) { NativeWebSocket.OnWebSocketErrorDescriptionDelegate onErrorDesc = this.OnErrorDesc; if (onErrorDesc != 0) { onErrorDesc(this, errorDescription); } ILogger logger = HTTPManager.Logger; } // Token: 0x04006705 RID: 26373 [Token(Token = "0x4006705")] private const int MaxFragmentSize = 32767; // Token: 0x04006706 RID: 26374 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4006706")] public NativeWebSocket.OnWebSocketOpenDelegate OnOpen; // Token: 0x04006707 RID: 26375 [FieldOffset(Offset = "0x18")] [Token(Token = "0x4006707")] public NativeWebSocket.OnWebSocketMessageDelegate OnMessage; // Token: 0x04006708 RID: 26376 [FieldOffset(Offset = "0x20")] [Token(Token = "0x4006708")] public NativeWebSocket.OnWebSocketBinaryDelegate OnBinary; // Token: 0x04006709 RID: 26377 [FieldOffset(Offset = "0x28")] [Token(Token = "0x4006709")] public NativeWebSocket.OnWebSocketClosedDelegate OnClosed; // Token: 0x0400670A RID: 26378 [FieldOffset(Offset = "0x30")] [Token(Token = "0x400670A")] public NativeWebSocket.OnWebSocketErrorDelegate OnError; // Token: 0x0400670B RID: 26379 [FieldOffset(Offset = "0x38")] [Token(Token = "0x400670B")] public NativeWebSocket.OnWebSocketErrorDescriptionDelegate OnErrorDesc; // Token: 0x0400670D RID: 26381 [FieldOffset(Offset = "0x48")] [Token(Token = "0x400670D")] private readonly Uri _uri; // Token: 0x0400670E RID: 26382 [FieldOffset(Offset = "0x50")] [Token(Token = "0x400670E")] private readonly ClientWebSocket _webSocket; // Token: 0x0400670F RID: 26383 [FieldOffset(Offset = "0x58")] [Token(Token = "0x400670F")] private readonly Queue _outboundMessageQueue; // Token: 0x04006710 RID: 26384 [FieldOffset(Offset = "0x60")] [Token(Token = "0x4006710")] private readonly List> _inboundFrames; // Token: 0x04006711 RID: 26385 [FieldOffset(Offset = "0x68")] [Token(Token = "0x4006711")] private readonly List _rentedBuffers; // Token: 0x04006712 RID: 26386 [FieldOffset(Offset = "0x70")] [Token(Token = "0x4006712")] private CancellationTokenSource _sendLoopCancellationTokenSource; // Token: 0x04006713 RID: 26387 [FieldOffset(Offset = "0x78")] [Token(Token = "0x4006713")] private AutoResetEvent _outboundMessagePendingEvent; // Token: 0x0200198E RID: 6542 [Token(Token = "0x200198E")] private struct OutboundMessage { // Token: 0x0600987D RID: 39037 RVA: 0x001F1C5C File Offset: 0x001EFE5C [Token(Token = "0x600987D")] [Address(RVA = "0x62EDF0", Offset = "0x62DDF0", VA = "0x18062EDF0")] public OutboundMessage(byte[] binaryMessage) { this.BinaryMessage = binaryMessage; this.TextMessage = (ulong)0L; } // Token: 0x0600987E RID: 39038 RVA: 0x001F1C7C File Offset: 0x001EFE7C [Token(Token = "0x600987E")] [Address(RVA = "0x62EE10", Offset = "0x62DE10", VA = "0x18062EE10")] public OutboundMessage(string textMessage) { int num = 0; this.TextMessage = textMessage; this.MessageType = (WebSocketMessageType)num; this.BinaryMessage = num; } // Token: 0x04006714 RID: 26388 [FieldOffset(Offset = "0x0")] [Token(Token = "0x4006714")] public readonly WebSocketMessageType MessageType; // Token: 0x04006715 RID: 26389 [FieldOffset(Offset = "0x8")] [Token(Token = "0x4006715")] public readonly byte[] BinaryMessage; // Token: 0x04006716 RID: 26390 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4006716")] public readonly string TextMessage; } // Token: 0x0200198F RID: 6543 [Token(Token = "0x200198F")] private struct InboundMessage { // Token: 0x0600987F RID: 39039 RVA: 0x001F1CA0 File Offset: 0x001EFEA0 [Token(Token = "0x600987F")] [Address(RVA = "0x62ADF0", Offset = "0x629DF0", VA = "0x18062ADF0")] public InboundMessage(byte[] binaryMessage) { this.BinaryMessage = binaryMessage; int num = 0; int num2 = 0; this.TextMessage = num2; this.CloseStatus = num; this.CloseStatusDescription = num2; } // Token: 0x06009880 RID: 39040 RVA: 0x001F1CD0 File Offset: 0x001EFED0 [Token(Token = "0x6009880")] [Address(RVA = "0x62ADD0", Offset = "0x629DD0", VA = "0x18062ADD0")] 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: 0x06009881 RID: 39041 RVA: 0x001F1D04 File Offset: 0x001EFF04 [Token(Token = "0x6009881")] [Address(RVA = "0x62AE10", Offset = "0x629E10", VA = "0x18062AE10")] public InboundMessage(WebSocketCloseStatus? closeStatus, string closeStatusDescription) { int num = 0; this.BinaryMessage = num; this.TextMessage = num; this.CloseStatus = closeStatus; this.CloseStatusDescription = closeStatusDescription; } // Token: 0x04006717 RID: 26391 [FieldOffset(Offset = "0x0")] [Token(Token = "0x4006717")] public readonly WebSocketMessageType MessageType; // Token: 0x04006718 RID: 26392 [FieldOffset(Offset = "0x8")] [Token(Token = "0x4006718")] public readonly byte[] BinaryMessage; // Token: 0x04006719 RID: 26393 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4006719")] public readonly string TextMessage; // Token: 0x0400671A RID: 26394 [FieldOffset(Offset = "0x18")] [Token(Token = "0x400671A")] public readonly WebSocketCloseStatus? CloseStatus; // Token: 0x0400671B RID: 26395 [FieldOffset(Offset = "0x20")] [Token(Token = "0x400671B")] public readonly string CloseStatusDescription; } // Token: 0x02001990 RID: 6544 [Token(Token = "0x2001990")] public sealed class OnWebSocketOpenDelegate : MulticastDelegate { // Token: 0x06009882 RID: 39042 RVA: 0x001F1D30 File Offset: 0x001EFF30 [Token(Token = "0x6009882")] [Address(RVA = "0x4AF020", Offset = "0x4AE020", VA = "0x1804AF020")] public OnWebSocketOpenDelegate(object @object, IntPtr method) { this.method = method; this.m_target = @object; } // Token: 0x06009883 RID: 39043 RVA: 0x001F1D4C File Offset: 0x001EFF4C [Token(Token = "0x6009883")] [Address(RVA = "0x5FA230", Offset = "0x5F9230", VA = "0x1805FA230", Slot = "13")] public void Invoke(NativeWebSocket webSocket) { if (this.delegates != 0) { } uint num; if (num != (uint)0) { throw new ExecutionEngineException(); } } // Token: 0x06009884 RID: 39044 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x6009884")] [Address(RVA = "0x5FA200", Offset = "0x5F9200", VA = "0x1805FA200", 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: 0x06009885 RID: 39045 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x6009885")] [Address(RVA = "0x4F56B0", Offset = "0x4F46B0", VA = "0x1804F56B0", Slot = "15")] public void EndInvoke(IAsyncResult result) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } } // Token: 0x02001991 RID: 6545 [Token(Token = "0x2001991")] public sealed class OnWebSocketMessageDelegate : MulticastDelegate { // Token: 0x06009886 RID: 39046 RVA: 0x001F1E00 File Offset: 0x001F0000 [Token(Token = "0x6009886")] [Address(RVA = "0x4AF020", Offset = "0x4AE020", VA = "0x1804AF020")] public OnWebSocketMessageDelegate(object @object, IntPtr method) { this.method = method; this.m_target = @object; } // Token: 0x06009887 RID: 39047 RVA: 0x001F1E1C File Offset: 0x001F001C [Token(Token = "0x6009887")] [Address(RVA = "0x62E170", Offset = "0x62D170", VA = "0x18062E170", Slot = "13")] public void Invoke(NativeWebSocket webSocket, string message) { if (this.delegates != 0) { } uint num; if (num != (uint)0) { throw new ExecutionEngineException(); } } // Token: 0x06009888 RID: 39048 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x6009888")] [Address(RVA = "0x52CC60", Offset = "0x52BC60", VA = "0x18052CC60", 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: 0x06009889 RID: 39049 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x6009889")] [Address(RVA = "0x4F56B0", Offset = "0x4F46B0", VA = "0x1804F56B0", Slot = "15")] public void EndInvoke(IAsyncResult result) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } } // Token: 0x02001992 RID: 6546 [Token(Token = "0x2001992")] public sealed class OnWebSocketBinaryDelegate : MulticastDelegate { // Token: 0x0600988A RID: 39050 RVA: 0x001F1E9C File Offset: 0x001F009C [Token(Token = "0x600988A")] [Address(RVA = "0x4AF020", Offset = "0x4AE020", VA = "0x1804AF020")] public OnWebSocketBinaryDelegate(object @object, IntPtr method) { this.method = method; this.m_target = @object; } // Token: 0x0600988B RID: 39051 RVA: 0x001F1EB8 File Offset: 0x001F00B8 [Token(Token = "0x600988B")] [Address(RVA = "0x62D840", Offset = "0x62C840", VA = "0x18062D840", Slot = "13")] public void Invoke(NativeWebSocket webSocket, byte[] data) { if (this.delegates != 0) { } uint num; if (num != (uint)0) { throw new ExecutionEngineException(); } } // Token: 0x0600988C RID: 39052 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x600988C")] [Address(RVA = "0x52CC60", Offset = "0x52BC60", VA = "0x18052CC60", 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: 0x0600988D RID: 39053 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x600988D")] [Address(RVA = "0x4F56B0", Offset = "0x4F46B0", VA = "0x1804F56B0", Slot = "15")] public void EndInvoke(IAsyncResult result) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } } // Token: 0x02001993 RID: 6547 [Token(Token = "0x2001993")] public sealed class OnWebSocketClosedDelegate : MulticastDelegate { // Token: 0x0600988E RID: 39054 RVA: 0x001F1F80 File Offset: 0x001F0180 [Token(Token = "0x600988E")] [Address(RVA = "0x4AF020", Offset = "0x4AE020", VA = "0x1804AF020")] public OnWebSocketClosedDelegate(object @object, IntPtr method) { this.method = method; this.m_target = @object; } // Token: 0x0600988F RID: 39055 RVA: 0x001F1F9C File Offset: 0x001F019C [Token(Token = "0x600988F")] [Address(RVA = "0x62DD30", Offset = "0x62CD30", VA = "0x18062DD30", 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: 0x06009890 RID: 39056 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x6009890")] [Address(RVA = "0x62DBF0", Offset = "0x62CBF0", VA = "0x18062DBF0", 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: 0x06009891 RID: 39057 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x6009891")] [Address(RVA = "0x4F56B0", Offset = "0x4F46B0", VA = "0x1804F56B0", Slot = "15")] public void EndInvoke(IAsyncResult result) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } } // Token: 0x02001994 RID: 6548 [Token(Token = "0x2001994")] public sealed class OnWebSocketErrorDelegate : MulticastDelegate { // Token: 0x06009892 RID: 39058 RVA: 0x001F2040 File Offset: 0x001F0240 [Token(Token = "0x6009892")] [Address(RVA = "0x4AF020", Offset = "0x4AE020", VA = "0x1804AF020")] public OnWebSocketErrorDelegate(object @object, IntPtr method) { this.method = method; this.m_target = @object; } // Token: 0x06009893 RID: 39059 RVA: 0x001F205C File Offset: 0x001F025C [Token(Token = "0x6009893")] [Address(RVA = "0x62D840", Offset = "0x62C840", VA = "0x18062D840", Slot = "13")] public void Invoke(NativeWebSocket webSocket, Exception ex) { if (this.delegates != 0) { } uint num; if (num != (uint)0) { throw new ExecutionEngineException(); } } // Token: 0x06009894 RID: 39060 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x6009894")] [Address(RVA = "0x52CC60", Offset = "0x52BC60", VA = "0x18052CC60", 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: 0x06009895 RID: 39061 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x6009895")] [Address(RVA = "0x4F56B0", Offset = "0x4F46B0", VA = "0x1804F56B0", Slot = "15")] public void EndInvoke(IAsyncResult result) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } } // Token: 0x02001995 RID: 6549 [Token(Token = "0x2001995")] public sealed class OnWebSocketErrorDescriptionDelegate : MulticastDelegate { // Token: 0x06009896 RID: 39062 RVA: 0x001F2120 File Offset: 0x001F0320 [Token(Token = "0x6009896")] [Address(RVA = "0x4AF020", Offset = "0x4AE020", VA = "0x1804AF020")] public OnWebSocketErrorDescriptionDelegate(object @object, IntPtr method) { this.method = method; this.m_target = @object; } // Token: 0x06009897 RID: 39063 RVA: 0x001F213C File Offset: 0x001F033C [Token(Token = "0x6009897")] [Address(RVA = "0x62E170", Offset = "0x62D170", VA = "0x18062E170", Slot = "13")] public void Invoke(NativeWebSocket webSocket, string reason) { if (this.delegates != 0) { } uint num; if (num != (uint)0) { throw new ExecutionEngineException(); } } // Token: 0x06009898 RID: 39064 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x6009898")] [Address(RVA = "0x52CC60", Offset = "0x52BC60", VA = "0x18052CC60", 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: 0x06009899 RID: 39065 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x6009899")] [Address(RVA = "0x4F56B0", Offset = "0x4F46B0", VA = "0x1804F56B0", Slot = "15")] public void EndInvoke(IAsyncResult result) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } } // Token: 0x02001996 RID: 6550 [Token(Token = "0x2001996")] public static class WaitHandleAsyncFactory { // Token: 0x0600989A RID: 39066 RVA: 0x001F21BC File Offset: 0x001F03BC [Token(Token = "0x600989A")] [Address(RVA = "0x633B70", Offset = "0x632B70", VA = "0x180633B70")] public static Task FromWaitHandle(WaitHandle handle) { /* An exception occurred when decompiling this method (0600989A) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Threading.Tasks.Task BestHTTP.WebSocket.NativeWebSocket/WaitHandleAsyncFactory::FromWaitHandle(System.Threading.WaitHandle) ---> System.Exception: Basic block has to end with unconditional control flow. { Block_0: stloc:XmlSchemaWhiteSpace(var_0_06, callgetter:XmlSchemaWhiteSpace(Datatype_anyAtomicType::get_BuiltInWhitespaceFacet, ldc.i4:int32[exp:Datatype_anyAtomicType](0))) } 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.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 1663 */; } // Token: 0x0600989B RID: 39067 RVA: 0x001F21D0 File Offset: 0x001F03D0 [Token(Token = "0x600989B")] [Address(RVA = "0x633800", Offset = "0x632800", VA = "0x180633800")] public static Task FromWaitHandle(WaitHandle handle, TimeSpan timeout) { XmlSchemaWhiteSpace builtInWhitespaceFacet = 0.BuiltInWhitespaceFacet; Task task; return task; } // Token: 0x0600989C RID: 39068 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x600989C")] [Address(RVA = "0x633760", Offset = "0x632760", VA = "0x180633760")] public static Task FromWaitHandle(WaitHandle handle, CancellationToken token) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x0600989D RID: 39069 RVA: 0x001F21E8 File Offset: 0x001F03E8 [Token(Token = "0x600989D")] [Address(RVA = "0x6338A0", Offset = "0x6328A0", VA = "0x1806338A0")] public static Task FromWaitHandle(WaitHandle handle, TimeSpan timeout, CancellationToken token) { /* An exception occurred when decompiling this method (0600989D) 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 1663 */; } // Token: 0x0600989E RID: 39070 RVA: 0x001F2240 File Offset: 0x001F0440 [Token(Token = "0x600989E")] [Address(RVA = "0x633660", Offset = "0x632660", VA = "0x180633660")] private static Task DoFromWaitHandle(WaitHandle handle, TimeSpan timeout, CancellationToken token) { AsyncTaskMethodBuilder asyncTaskMethodBuilder = AsyncTaskMethodBuilder.Create(); Task task; return task; } // Token: 0x0600989F RID: 39071 RVA: 0x001F2258 File Offset: 0x001F0458 // Note: this type is marked as 'beforefieldinit'. [Token(Token = "0x600989F")] [Address(RVA = "0x633C40", Offset = "0x632C40", VA = "0x180633C40")] 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: 0x0400671C RID: 26396 [Token(Token = "0x400671C")] private static Task CompletedTaskTrue; // Token: 0x0400671D RID: 26397 [Token(Token = "0x400671D")] private static Task CompletedTaskFalse; // Token: 0x0400671E RID: 26398 [Token(Token = "0x400671E")] private static Task CancelledTask; // Token: 0x02001997 RID: 6551 [Token(Token = "0x2001997")] private sealed class ThreadPoolRegistration : IDisposable { // Token: 0x060098A0 RID: 39072 RVA: 0x000399F2 File Offset: 0x00037BF2 [Token(Token = "0x60098A0")] [Address(RVA = "0x630560", Offset = "0x62F560", VA = "0x180630560")] public ThreadPoolRegistration(WaitHandle handle, TimeSpan timeout, TaskCompletionSource tcs) { } // Token: 0x060098A1 RID: 39073 RVA: 0x000399F2 File Offset: 0x00037BF2 [Token(Token = "0x60098A1")] [Address(RVA = "0x630530", Offset = "0x62F530", VA = "0x180630530", Slot = "4")] void IDisposable.Dispose() { } // Token: 0x0400671F RID: 26399 [FieldOffset(Offset = "0x10")] [Token(Token = "0x400671F")] private readonly RegisteredWaitHandle _registeredWaitHandle; } } } }