scripts
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.WebSocket.Frames;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket.Extensions
|
||||
{
|
||||
// Token: 0x020012F1 RID: 4849
|
||||
[Token(Token = "0x20012F1")]
|
||||
[StructLayout(3)]
|
||||
public interface IExtension
|
||||
{
|
||||
// Token: 0x0600797D RID: 31101
|
||||
[Token(Token = "0x600797D")]
|
||||
[Address(Slot = "0")]
|
||||
void AddNegotiation(HTTPRequest request);
|
||||
|
||||
// Token: 0x0600797E RID: 31102
|
||||
[Token(Token = "0x600797E")]
|
||||
[Address(Slot = "1")]
|
||||
bool ParseNegotiation(WebSocketResponse resp);
|
||||
|
||||
// Token: 0x0600797F RID: 31103
|
||||
[Token(Token = "0x600797F")]
|
||||
[Address(Slot = "2")]
|
||||
byte GetFrameHeader(WebSocketFrame writer, byte inFlag);
|
||||
|
||||
// Token: 0x06007980 RID: 31104
|
||||
[Token(Token = "0x6007980")]
|
||||
[Address(Slot = "3")]
|
||||
byte[] Encode(WebSocketFrame writer);
|
||||
|
||||
// Token: 0x06007981 RID: 31105
|
||||
[Token(Token = "0x6007981")]
|
||||
[Address(Slot = "4")]
|
||||
byte[] Decode(byte header, byte[] data, int length);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,331 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.Decompression.Zlib;
|
||||
using BestHTTP.Extensions;
|
||||
using BestHTTP.WebSocket.Frames;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket.Extensions
|
||||
{
|
||||
// Token: 0x020012F2 RID: 4850
|
||||
[Token(Token = "0x20012F2")]
|
||||
[StructLayout(3)]
|
||||
public sealed class PerMessageCompression : IExtension
|
||||
{
|
||||
// Token: 0x170013C1 RID: 5057
|
||||
// (get) Token: 0x06007982 RID: 31106 RVA: 0x001944E8 File Offset: 0x001926E8
|
||||
// (set) Token: 0x06007983 RID: 31107 RVA: 0x001944FC File Offset: 0x001926FC
|
||||
[Token(Token = "0x170013C1")]
|
||||
public bool ClientNoContextTakeover
|
||||
{
|
||||
[Token(Token = "0x6007982")]
|
||||
[Address(RVA = "0x559440", Offset = "0x557E40", VA = "0x180559440")]
|
||||
get;
|
||||
[Token(Token = "0x6007983")]
|
||||
[Address(RVA = "0x559450", Offset = "0x557E50", VA = "0x180559450")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013C2 RID: 5058
|
||||
// (get) Token: 0x06007984 RID: 31108 RVA: 0x00194510 File Offset: 0x00192710
|
||||
// (set) Token: 0x06007985 RID: 31109 RVA: 0x00194524 File Offset: 0x00192724
|
||||
[Token(Token = "0x170013C2")]
|
||||
public bool ServerNoContextTakeover
|
||||
{
|
||||
[Token(Token = "0x6007984")]
|
||||
[Address(RVA = "0x6E4A50", Offset = "0x6E3450", VA = "0x1806E4A50")]
|
||||
get;
|
||||
[Token(Token = "0x6007985")]
|
||||
[Address(RVA = "0x6E4A60", Offset = "0x6E3460", VA = "0x1806E4A60")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013C3 RID: 5059
|
||||
// (get) Token: 0x06007986 RID: 31110 RVA: 0x00194538 File Offset: 0x00192738
|
||||
// (set) Token: 0x06007987 RID: 31111 RVA: 0x0019454C File Offset: 0x0019274C
|
||||
[Token(Token = "0x170013C3")]
|
||||
public int ClientMaxWindowBits
|
||||
{
|
||||
[Token(Token = "0x6007986")]
|
||||
[Address(RVA = "0x55D550", Offset = "0x55BF50", VA = "0x18055D550")]
|
||||
get;
|
||||
[Token(Token = "0x6007987")]
|
||||
[Address(RVA = "0x55D5D0", Offset = "0x55BFD0", VA = "0x18055D5D0")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013C4 RID: 5060
|
||||
// (get) Token: 0x06007988 RID: 31112 RVA: 0x00194560 File Offset: 0x00192760
|
||||
// (set) Token: 0x06007989 RID: 31113 RVA: 0x00194574 File Offset: 0x00192774
|
||||
[Token(Token = "0x170013C4")]
|
||||
public int ServerMaxWindowBits
|
||||
{
|
||||
[Token(Token = "0x6007988")]
|
||||
[Address(RVA = "0x3EE8D0", Offset = "0x3ED2D0", VA = "0x1803EE8D0")]
|
||||
get;
|
||||
[Token(Token = "0x6007989")]
|
||||
[Address(RVA = "0x4F8C20", Offset = "0x4F7620", VA = "0x1804F8C20")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013C5 RID: 5061
|
||||
// (get) Token: 0x0600798A RID: 31114 RVA: 0x00194588 File Offset: 0x00192788
|
||||
// (set) Token: 0x0600798B RID: 31115 RVA: 0x0019459C File Offset: 0x0019279C
|
||||
[Token(Token = "0x170013C5")]
|
||||
public CompressionLevel Level
|
||||
{
|
||||
[Token(Token = "0x600798A")]
|
||||
[Address(RVA = "0x4F8C10", Offset = "0x4F7610", VA = "0x1804F8C10")]
|
||||
get;
|
||||
[Token(Token = "0x600798B")]
|
||||
[Address(RVA = "0x420CD0", Offset = "0x41F6D0", VA = "0x180420CD0")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013C6 RID: 5062
|
||||
// (get) Token: 0x0600798C RID: 31116 RVA: 0x001945B0 File Offset: 0x001927B0
|
||||
// (set) Token: 0x0600798D RID: 31117 RVA: 0x001945C4 File Offset: 0x001927C4
|
||||
[Token(Token = "0x170013C6")]
|
||||
public int MinimumDataLegthToCompress
|
||||
{
|
||||
[Token(Token = "0x600798C")]
|
||||
[Address(RVA = "0x4FBD40", Offset = "0x4FA740", VA = "0x1804FBD40")]
|
||||
get;
|
||||
[Token(Token = "0x600798D")]
|
||||
[Address(RVA = "0x4E90F0", Offset = "0x4E7AF0", VA = "0x1804E90F0")]
|
||||
set;
|
||||
}
|
||||
|
||||
// Token: 0x0600798E RID: 31118 RVA: 0x001945D8 File Offset: 0x001927D8
|
||||
[Token(Token = "0x600798E")]
|
||||
[Address(RVA = "0x6F3F00", Offset = "0x6F2900", VA = "0x1806F3F00")]
|
||||
public PerMessageCompression()
|
||||
{
|
||||
this.Level = (CompressionLevel)((ulong)6L);
|
||||
this.ClientNoContextTakeover = false;
|
||||
this.ClientMaxWindowBits = (int)((ulong)15L);
|
||||
this.ServerMaxWindowBits = (int)((ulong)15L);
|
||||
this.MinimumDataLegthToCompress = (int)((ulong)256L);
|
||||
}
|
||||
|
||||
// Token: 0x0600798F RID: 31119 RVA: 0x0019461C File Offset: 0x0019281C
|
||||
[Token(Token = "0x600798F")]
|
||||
[Address(RVA = "0x6F3EB0", Offset = "0x6F28B0", VA = "0x1806F3EB0")]
|
||||
public PerMessageCompression(CompressionLevel level, bool clientNoContextTakeover, bool serverNoContextTakeover, int desiredClientMaxWindowBits, int desiredServerMaxWindowBits, int minDatalengthToCompress)
|
||||
{
|
||||
this.ClientMaxWindowBits = 0;
|
||||
this.ServerMaxWindowBits = 0;
|
||||
this.Level = level;
|
||||
this.MinimumDataLegthToCompress = 0;
|
||||
this.ClientNoContextTakeover = clientNoContextTakeover;
|
||||
}
|
||||
|
||||
// Token: 0x06007990 RID: 31120 RVA: 0x00194654 File Offset: 0x00192854
|
||||
[Token(Token = "0x6007990")]
|
||||
[Address(RVA = "0x6F3340", Offset = "0x6F1D40", VA = "0x1806F3340", Slot = "4")]
|
||||
public void AddNegotiation(HTTPRequest request)
|
||||
{
|
||||
if (this.<ServerNoContextTakeover>k__BackingField)
|
||||
{
|
||||
string text = "permessage-deflate" + "; server_no_context_takeover";
|
||||
}
|
||||
if (this.<ClientNoContextTakeover>k__BackingField)
|
||||
{
|
||||
string text2 = "permessage-deflate" + "; client_no_context_takeover";
|
||||
}
|
||||
int num = this.<ServerMaxWindowBits>k__BackingField;
|
||||
if (num == 15)
|
||||
{
|
||||
this.<ServerMaxWindowBits>k__BackingField = num;
|
||||
}
|
||||
string text4;
|
||||
string text3;
|
||||
if (this.<ClientMaxWindowBits>k__BackingField == 15)
|
||||
{
|
||||
text3 = text4 + "; client_max_window_bits";
|
||||
this.<ClientMaxWindowBits>k__BackingField = (int)((ulong)15L);
|
||||
}
|
||||
string text5 = text4 + "; client_max_window_bits=" + text3;
|
||||
request.AddHeader("Sec-WebSocket-Extensions", text5);
|
||||
}
|
||||
|
||||
// Token: 0x06007991 RID: 31121 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007991")]
|
||||
[Address(RVA = "0x6F3B20", Offset = "0x6F2520", VA = "0x1806F3B20", Slot = "5")]
|
||||
public bool ParseNegotiation(WebSocketResponse resp)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06007992 RID: 31122 RVA: 0x001946EC File Offset: 0x001928EC
|
||||
[Token(Token = "0x6007992")]
|
||||
[Address(RVA = "0x6F3AE0", Offset = "0x6F24E0", VA = "0x1806F3AE0", Slot = "6")]
|
||||
public byte GetFrameHeader(WebSocketFrame writer, byte inFlag)
|
||||
{
|
||||
WebSocketFrameTypes <Type>k__BackingField = writer.<Type>k__BackingField;
|
||||
if (writer.<Data>k__BackingField != 0)
|
||||
{
|
||||
int num = this.<MinimumDataLegthToCompress>k__BackingField;
|
||||
}
|
||||
return inFlag;
|
||||
}
|
||||
|
||||
// Token: 0x06007993 RID: 31123 RVA: 0x00194718 File Offset: 0x00192918
|
||||
[Token(Token = "0x6007993")]
|
||||
[Address(RVA = "0x6F3A30", Offset = "0x6F2430", VA = "0x1806F3A30", Slot = "7")]
|
||||
public byte[] Encode(WebSocketFrame writer)
|
||||
{
|
||||
byte[] <Data>k__BackingField = writer.<Data>k__BackingField;
|
||||
if (<Data>k__BackingField != 0)
|
||||
{
|
||||
return <Data>k__BackingField;
|
||||
}
|
||||
return VariableSizedBufferPool.NoData;
|
||||
}
|
||||
|
||||
// Token: 0x06007994 RID: 31124 RVA: 0x00194750 File Offset: 0x00192950
|
||||
[Token(Token = "0x6007994")]
|
||||
[Address(RVA = "0x6F3700", Offset = "0x6F2100", VA = "0x1806F3700", Slot = "8")]
|
||||
public byte[] Decode(byte header, byte[] data, int length)
|
||||
{
|
||||
return this.Decompress(data, length);
|
||||
}
|
||||
|
||||
// Token: 0x06007995 RID: 31125 RVA: 0x00194768 File Offset: 0x00192968
|
||||
[Token(Token = "0x6007995")]
|
||||
[Address(RVA = "0x6F3470", Offset = "0x6F1E70", VA = "0x1806F3470")]
|
||||
private byte[] Compress(byte[] data, int length)
|
||||
{
|
||||
int num;
|
||||
byte[] array;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
if (this.compressorOutputStream == 0)
|
||||
{
|
||||
BufferPoolMemoryStream bufferPoolMemoryStream = new BufferPoolMemoryStream();
|
||||
this.compressorOutputStream = bufferPoolMemoryStream;
|
||||
}
|
||||
if (this.compressorDeflateStream == num)
|
||||
{
|
||||
CompressionLevel compressionLevel = this.<Level>k__BackingField;
|
||||
int num2 = this.<ClientMaxWindowBits>k__BackingField;
|
||||
DeflateStream deflateStream;
|
||||
this.compressorDeflateStream = deflateStream;
|
||||
FlushType flushMode = deflateStream.FlushMode;
|
||||
}
|
||||
int num3 = this.compressorDeflateStream.ReadByte();
|
||||
DeflateStream deflateStream2 = this.compressorDeflateStream;
|
||||
long position = this.compressorOutputStream.Position;
|
||||
bool canWrite = this.compressorOutputStream.CanWrite;
|
||||
array = this.compressorOutputStream.ToArray();
|
||||
int num4 = 0;
|
||||
if (this.<ClientNoContextTakeover>k__BackingField)
|
||||
{
|
||||
this.compressorDeflateStream.Dispose();
|
||||
this.compressorDeflateStream = (ulong)0L;
|
||||
}
|
||||
if (num4 != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06007996 RID: 31126 RVA: 0x00194850 File Offset: 0x00192A50
|
||||
[Token(Token = "0x6007996")]
|
||||
[Address(RVA = "0x6F3720", Offset = "0x6F2120", VA = "0x1806F3720")]
|
||||
private byte[] Decompress(byte[] data, int length)
|
||||
{
|
||||
BufferPoolMemoryStream bufferPoolMemoryStream = this.decompressorInputStream;
|
||||
if (bufferPoolMemoryStream == 0)
|
||||
{
|
||||
int num;
|
||||
BufferPoolMemoryStream bufferPoolMemoryStream2 = new BufferPoolMemoryStream(num);
|
||||
num = data.Length;
|
||||
num += 4;
|
||||
this.decompressorInputStream = bufferPoolMemoryStream2;
|
||||
}
|
||||
int num2 = bufferPoolMemoryStream.ReadByte();
|
||||
BufferPoolMemoryStream bufferPoolMemoryStream3 = this.decompressorInputStream;
|
||||
byte[] trailer = PerMessageCompression.Trailer;
|
||||
int num3 = bufferPoolMemoryStream3.ReadByte();
|
||||
long position = this.decompressorInputStream.Position;
|
||||
int num4 = 0;
|
||||
if (this.decompressorDeflateStream == num4)
|
||||
{
|
||||
BufferPoolMemoryStream bufferPoolMemoryStream4 = this.decompressorInputStream;
|
||||
int num5 = this.<ServerMaxWindowBits>k__BackingField;
|
||||
ulong num6;
|
||||
DeflateStream deflateStream = new DeflateStream(bufferPoolMemoryStream4, CompressionMode.Decompress, CompressionLevel.Default, num6 != 0UL, num5);
|
||||
this.decompressorDeflateStream = deflateStream;
|
||||
FlushType flushMode = deflateStream.FlushMode;
|
||||
}
|
||||
if (this.decompressorOutputStream == 0)
|
||||
{
|
||||
BufferPoolMemoryStream bufferPoolMemoryStream5 = new BufferPoolMemoryStream();
|
||||
this.decompressorOutputStream = bufferPoolMemoryStream5;
|
||||
}
|
||||
uint num7;
|
||||
ulong num8;
|
||||
byte[] array = VariableSizedBufferPool.Get((long)num7, num8 != 0UL);
|
||||
DeflateStream deflateStream2 = this.decompressorDeflateStream;
|
||||
int num9 = this.decompressorOutputStream.ReadByte();
|
||||
VariableSizedBufferPool.Release(array);
|
||||
DeflateStream deflateStream3 = this.decompressorDeflateStream;
|
||||
byte[] array2 = this.decompressorOutputStream.ToArray();
|
||||
if ((this.<ServerNoContextTakeover>k__BackingField ? 1 : 0) != num4)
|
||||
{
|
||||
this.decompressorDeflateStream.Dispose();
|
||||
this.decompressorDeflateStream = num4;
|
||||
}
|
||||
return array2;
|
||||
}
|
||||
|
||||
// Token: 0x06007997 RID: 31127 RVA: 0x00194964 File Offset: 0x00192B64
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x6007997")]
|
||||
[Address(RVA = "0x6F3E20", Offset = "0x6F2820", VA = "0x1806F3E20")]
|
||||
static PerMessageCompression()
|
||||
{
|
||||
byte[] array = new byte[4];
|
||||
array[0] = (byte)((ulong)255L);
|
||||
array[0] = (byte)((ulong)255L);
|
||||
PerMessageCompression.Trailer = array;
|
||||
}
|
||||
|
||||
// Token: 0x040057A7 RID: 22439
|
||||
[Token(Token = "0x40057A7")]
|
||||
public const int MinDataLengthToCompressDefault = 256;
|
||||
|
||||
// Token: 0x040057A8 RID: 22440
|
||||
[Token(Token = "0x40057A8")]
|
||||
private static readonly byte[] Trailer;
|
||||
|
||||
// Token: 0x040057AF RID: 22447
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40057AF")]
|
||||
private BufferPoolMemoryStream compressorOutputStream;
|
||||
|
||||
// Token: 0x040057B0 RID: 22448
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40057B0")]
|
||||
private DeflateStream compressorDeflateStream;
|
||||
|
||||
// Token: 0x040057B1 RID: 22449
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40057B1")]
|
||||
private BufferPoolMemoryStream decompressorInputStream;
|
||||
|
||||
// Token: 0x040057B2 RID: 22450
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40057B2")]
|
||||
private BufferPoolMemoryStream decompressorOutputStream;
|
||||
|
||||
// Token: 0x040057B3 RID: 22451
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40057B3")]
|
||||
private DeflateStream decompressorDeflateStream;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket.Frames
|
||||
{
|
||||
// Token: 0x020012ED RID: 4845
|
||||
[Token(Token = "0x20012ED")]
|
||||
[StructLayout(0, Size = 16)]
|
||||
public struct RawFrameData : IDisposable
|
||||
{
|
||||
// Token: 0x06007957 RID: 31063 RVA: 0x001940DC File Offset: 0x001922DC
|
||||
[Token(Token = "0x6007957")]
|
||||
[Address(RVA = "0x14370", Offset = "0x13770", VA = "0x180014370")]
|
||||
public RawFrameData(byte[] data, int length)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007958 RID: 31064 RVA: 0x001940EC File Offset: 0x001922EC
|
||||
[Token(Token = "0x6007958")]
|
||||
[Address(RVA = "0x14300", Offset = "0x13700", VA = "0x180014300", Slot = "4")]
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04005791 RID: 22417
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x4005791")]
|
||||
public byte[] Data;
|
||||
|
||||
// Token: 0x04005792 RID: 22418
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x8")]
|
||||
[Token(Token = "0x4005792")]
|
||||
public int Length;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.Extensions;
|
||||
using BestHTTP.WebSocket.Extensions;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket.Frames
|
||||
{
|
||||
// Token: 0x020012EE RID: 4846
|
||||
[Token(Token = "0x20012EE")]
|
||||
[StructLayout(3)]
|
||||
public sealed class WebSocketFrame
|
||||
{
|
||||
// Token: 0x170013B4 RID: 5044
|
||||
// (get) Token: 0x06007959 RID: 31065 RVA: 0x001940FC File Offset: 0x001922FC
|
||||
// (set) Token: 0x0600795A RID: 31066 RVA: 0x00194110 File Offset: 0x00192310
|
||||
[Token(Token = "0x170013B4")]
|
||||
public WebSocketFrameTypes Type
|
||||
{
|
||||
[Token(Token = "0x6007959")]
|
||||
[Address(RVA = "0x559440", Offset = "0x557E40", VA = "0x180559440")]
|
||||
get;
|
||||
[Token(Token = "0x600795A")]
|
||||
[Address(RVA = "0x559450", Offset = "0x557E50", VA = "0x180559450")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013B5 RID: 5045
|
||||
// (get) Token: 0x0600795B RID: 31067 RVA: 0x00194124 File Offset: 0x00192324
|
||||
// (set) Token: 0x0600795C RID: 31068 RVA: 0x00194138 File Offset: 0x00192338
|
||||
[Token(Token = "0x170013B5")]
|
||||
public bool IsFinal
|
||||
{
|
||||
[Token(Token = "0x600795B")]
|
||||
[Address(RVA = "0x6E4A50", Offset = "0x6E3450", VA = "0x1806E4A50")]
|
||||
get;
|
||||
[Token(Token = "0x600795C")]
|
||||
[Address(RVA = "0x6E4A60", Offset = "0x6E3460", VA = "0x1806E4A60")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013B6 RID: 5046
|
||||
// (get) Token: 0x0600795D RID: 31069 RVA: 0x0019414C File Offset: 0x0019234C
|
||||
// (set) Token: 0x0600795E RID: 31070 RVA: 0x00194160 File Offset: 0x00192360
|
||||
[Token(Token = "0x170013B6")]
|
||||
public byte Header
|
||||
{
|
||||
[Token(Token = "0x600795D")]
|
||||
[Address(RVA = "0x6E4A70", Offset = "0x6E3470", VA = "0x1806E4A70")]
|
||||
get;
|
||||
[Token(Token = "0x600795E")]
|
||||
[Address(RVA = "0x6E4A80", Offset = "0x6E3480", VA = "0x1806E4A80")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013B7 RID: 5047
|
||||
// (get) Token: 0x0600795F RID: 31071 RVA: 0x00194174 File Offset: 0x00192374
|
||||
// (set) Token: 0x06007960 RID: 31072 RVA: 0x00194188 File Offset: 0x00192388
|
||||
[Token(Token = "0x170013B7")]
|
||||
public byte[] Data
|
||||
{
|
||||
[Token(Token = "0x600795F")]
|
||||
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
|
||||
get;
|
||||
[Token(Token = "0x6007960")]
|
||||
[Address(RVA = "0x3C1280", Offset = "0x3BFC80", VA = "0x1803C1280")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013B8 RID: 5048
|
||||
// (get) Token: 0x06007961 RID: 31073 RVA: 0x0019419C File Offset: 0x0019239C
|
||||
// (set) Token: 0x06007962 RID: 31074 RVA: 0x001941B0 File Offset: 0x001923B0
|
||||
[Token(Token = "0x170013B8")]
|
||||
public int DataLength
|
||||
{
|
||||
[Token(Token = "0x6007961")]
|
||||
[Address(RVA = "0x4FBD40", Offset = "0x4FA740", VA = "0x1804FBD40")]
|
||||
get;
|
||||
[Token(Token = "0x6007962")]
|
||||
[Address(RVA = "0x4E90F0", Offset = "0x4E7AF0", VA = "0x1804E90F0")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013B9 RID: 5049
|
||||
// (get) Token: 0x06007963 RID: 31075 RVA: 0x001941C4 File Offset: 0x001923C4
|
||||
// (set) Token: 0x06007964 RID: 31076 RVA: 0x001941D8 File Offset: 0x001923D8
|
||||
[Token(Token = "0x170013B9")]
|
||||
public bool UseExtensions
|
||||
{
|
||||
[Token(Token = "0x6007963")]
|
||||
[Address(RVA = "0x4D2560", Offset = "0x4D0F60", VA = "0x1804D2560")]
|
||||
get;
|
||||
[Token(Token = "0x6007964")]
|
||||
[Address(RVA = "0x4D2740", Offset = "0x4D1140", VA = "0x1804D2740")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x06007965 RID: 31077 RVA: 0x001941EC File Offset: 0x001923EC
|
||||
[Token(Token = "0x6007965")]
|
||||
[Address(RVA = "0x6F93F0", Offset = "0x6F7DF0", VA = "0x1806F93F0")]
|
||||
public WebSocketFrame(WebSocket webSocket, WebSocketFrameTypes type, byte[] data)
|
||||
{
|
||||
if (data != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007966 RID: 31078 RVA: 0x00194208 File Offset: 0x00192408
|
||||
[Token(Token = "0x6007966")]
|
||||
[Address(RVA = "0x6F9340", Offset = "0x6F7D40", VA = "0x1806F9340")]
|
||||
public WebSocketFrame(WebSocket webSocket, WebSocketFrameTypes type, byte[] data, bool useExtensions)
|
||||
{
|
||||
if (data != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007967 RID: 31079 RVA: 0x00194224 File Offset: 0x00192424
|
||||
[Token(Token = "0x6007967")]
|
||||
[Address(RVA = "0x6F9390", Offset = "0x6F7D90", VA = "0x1806F9390")]
|
||||
public WebSocketFrame(WebSocket webSocket, WebSocketFrameTypes type, byte[] data, bool isFinal, bool useExtensions)
|
||||
{
|
||||
if (data != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007968 RID: 31080 RVA: 0x00194240 File Offset: 0x00192440
|
||||
[Token(Token = "0x6007968")]
|
||||
[Address(RVA = "0x6F9150", Offset = "0x6F7B50", VA = "0x1806F9150")]
|
||||
public WebSocketFrame(WebSocket webSocket, WebSocketFrameTypes type, byte[] data, ulong pos, ulong length, bool isFinal, bool useExtensions)
|
||||
{
|
||||
this.IsFinal = false;
|
||||
this.Type = type;
|
||||
int num = 0;
|
||||
this.UseExtensions = false;
|
||||
this.DataLength = 0;
|
||||
if (data == 0)
|
||||
{
|
||||
}
|
||||
int num2 = this.<DataLength>k__BackingField;
|
||||
byte[] array;
|
||||
this.Data = array;
|
||||
this.Header = data;
|
||||
if ((this.<UseExtensions>k__BackingField ? 1 : 0) != num && webSocket != 0 && webSocket.<Extensions>k__BackingField != num)
|
||||
{
|
||||
IExtension[] <Extensions>k__BackingField = webSocket.<Extensions>k__BackingField;
|
||||
int length2 = <Extensions>k__BackingField.Length;
|
||||
if (num < length2)
|
||||
{
|
||||
if (<Extensions>k__BackingField[num] != 0)
|
||||
{
|
||||
byte b = this.<Header>k__BackingField;
|
||||
this.Header = (byte)num;
|
||||
byte[] array2 = this.<Data>k__BackingField;
|
||||
if (num != array2)
|
||||
{
|
||||
VariableSizedBufferPool.Release(array2);
|
||||
this.Data = num;
|
||||
this.DataLength = num;
|
||||
}
|
||||
}
|
||||
num++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007969 RID: 31081 RVA: 0x001942FC File Offset: 0x001924FC
|
||||
[Token(Token = "0x6007969")]
|
||||
[Address(RVA = "0x6F8D40", Offset = "0x6F7740", VA = "0x1806F8D40")]
|
||||
public RawFrameData Get()
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
byte[] noData = VariableSizedBufferPool.NoData;
|
||||
byte[] array;
|
||||
int length = array.Length;
|
||||
int num2 = 0;
|
||||
Array.Reverse(array, num2, length);
|
||||
byte[] array2;
|
||||
int length2 = array2.Length;
|
||||
int num3 = 0;
|
||||
Array.Reverse(array2, num3, length2);
|
||||
BufferPoolMemoryStream bufferPoolMemoryStream;
|
||||
int num4 = bufferPoolMemoryStream.ReadByte();
|
||||
int num5 = bufferPoolMemoryStream.ReadByte();
|
||||
if (num < "{il2cpp array field il2cppMethodInfo->}")
|
||||
{
|
||||
num++;
|
||||
num++;
|
||||
}
|
||||
byte[] array3 = bufferPoolMemoryStream.ToArray(true);
|
||||
bool canWrite = bufferPoolMemoryStream.CanWrite;
|
||||
if (bufferPoolMemoryStream != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600796A RID: 31082 RVA: 0x001943B0 File Offset: 0x001925B0
|
||||
[Token(Token = "0x600796A")]
|
||||
[Address(RVA = "0x6F8B40", Offset = "0x6F7540", VA = "0x1806F8B40")]
|
||||
public WebSocketFrame[] Fragment(ushort maxFragmentSize)
|
||||
{
|
||||
if (this.<Data>k__BackingField != (ulong)0L)
|
||||
{
|
||||
WebSocketFrameTypes webSocketFrameTypes = this.<Type>k__BackingField;
|
||||
if (this.<DataLength>k__BackingField > (int)maxFragmentSize)
|
||||
{
|
||||
WebSocketFrame[] array = new WebSocketFrame[(int)maxFragmentSize];
|
||||
int num = this.<DataLength>k__BackingField;
|
||||
if ((int)maxFragmentSize < num)
|
||||
{
|
||||
num -= (int)maxFragmentSize;
|
||||
ulong num2 = Math.Min((ulong)maxFragmentSize, (ulong)num);
|
||||
int num3 = this.<DataLength>k__BackingField;
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
this.<DataLength>k__BackingField = (int)maxFragmentSize;
|
||||
return array;
|
||||
}
|
||||
}
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,224 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket.Frames
|
||||
{
|
||||
// Token: 0x020012EF RID: 4847
|
||||
[Token(Token = "0x20012EF")]
|
||||
[StructLayout(0, Size = 40)]
|
||||
public struct WebSocketFrameReader
|
||||
{
|
||||
// Token: 0x170013BA RID: 5050
|
||||
// (get) Token: 0x0600796B RID: 31083 RVA: 0x00194434 File Offset: 0x00192634
|
||||
// (set) Token: 0x0600796C RID: 31084 RVA: 0x00194448 File Offset: 0x00192648
|
||||
[Token(Token = "0x170013BA")]
|
||||
public byte Header
|
||||
{
|
||||
[Token(Token = "0x600796B")]
|
||||
[Address(RVA = "0xF340", Offset = "0xE740", VA = "0x18000F340")]
|
||||
get;
|
||||
[Token(Token = "0x600796C")]
|
||||
[Address(RVA = "0xF370", Offset = "0xE770", VA = "0x18000F370")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013BB RID: 5051
|
||||
// (get) Token: 0x0600796D RID: 31085 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
// (set) Token: 0x0600796E RID: 31086 RVA: 0x0019445C File Offset: 0x0019265C
|
||||
[Token(Token = "0x170013BB")]
|
||||
public bool IsFinal
|
||||
{
|
||||
[Token(Token = "0x600796D")]
|
||||
[Address(RVA = "0xF330", Offset = "0xE730", VA = "0x18000F330")]
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
[Token(Token = "0x600796E")]
|
||||
[Address(RVA = "0xF360", Offset = "0xE760", VA = "0x18000F360")]
|
||||
[CompilerGenerated]
|
||||
private set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170013BC RID: 5052
|
||||
// (get) Token: 0x0600796F RID: 31087 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
// (set) Token: 0x06007970 RID: 31088 RVA: 0x0019446C File Offset: 0x0019266C
|
||||
[Token(Token = "0x170013BC")]
|
||||
public WebSocketFrameTypes Type
|
||||
{
|
||||
[Token(Token = "0x600796F")]
|
||||
[Address(RVA = "0xF350", Offset = "0xE750", VA = "0x18000F350")]
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
[Token(Token = "0x6007970")]
|
||||
[Address(RVA = "0xF380", Offset = "0xE780", VA = "0x18000F380")]
|
||||
[CompilerGenerated]
|
||||
private set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170013BD RID: 5053
|
||||
// (get) Token: 0x06007971 RID: 31089 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
// (set) Token: 0x06007972 RID: 31090 RVA: 0x0019447C File Offset: 0x0019267C
|
||||
[Token(Token = "0x170013BD")]
|
||||
public bool HasMask
|
||||
{
|
||||
[Token(Token = "0x6007971")]
|
||||
[Address(RVA = "0x14600", Offset = "0x13A00", VA = "0x180014600")]
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
[Token(Token = "0x6007972")]
|
||||
[Address(RVA = "0x14620", Offset = "0x13A20", VA = "0x180014620")]
|
||||
[CompilerGenerated]
|
||||
private set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170013BE RID: 5054
|
||||
// (get) Token: 0x06007973 RID: 31091 RVA: 0x0019448C File Offset: 0x0019268C
|
||||
// (set) Token: 0x06007974 RID: 31092 RVA: 0x001944A0 File Offset: 0x001926A0
|
||||
[Token(Token = "0x170013BE")]
|
||||
public ulong Length
|
||||
{
|
||||
[Token(Token = "0x6007973")]
|
||||
[Address(RVA = "0x8F20", Offset = "0x8320", VA = "0x180008F20")]
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007973)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.UInt64 BestHTTP.WebSocket.Frames.WebSocketFrameReader::get_Length()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:string(var_0_06, ldfld:string(WebSocketFrameReader::<DataAsText>k__BackingField, ldloc:valuetype BestHTTP.WebSocket.Frames.WebSocketFrameReader&(this)))
|
||||
}
|
||||
|
||||
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(Token = "0x6007974")]
|
||||
[Address(RVA = "0x8F50", Offset = "0x8350", VA = "0x180008F50")]
|
||||
[CompilerGenerated]
|
||||
private set
|
||||
{
|
||||
this.<DataAsText>k__BackingField = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170013BF RID: 5055
|
||||
// (get) Token: 0x06007975 RID: 31093 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
// (set) Token: 0x06007976 RID: 31094 RVA: 0x001944B4 File Offset: 0x001926B4
|
||||
[Token(Token = "0x170013BF")]
|
||||
public byte[] Data
|
||||
{
|
||||
[Token(Token = "0x6007975")]
|
||||
[Address(RVA = "0x8F10", Offset = "0x8310", VA = "0x180008F10")]
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
[Token(Token = "0x6007976")]
|
||||
[Address(RVA = "0x8F40", Offset = "0x8340", VA = "0x180008F40")]
|
||||
[CompilerGenerated]
|
||||
private set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170013C0 RID: 5056
|
||||
// (get) Token: 0x06007977 RID: 31095 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
// (set) Token: 0x06007978 RID: 31096 RVA: 0x001944C4 File Offset: 0x001926C4
|
||||
[Token(Token = "0x170013C0")]
|
||||
public string DataAsText
|
||||
{
|
||||
[Token(Token = "0x6007977")]
|
||||
[Address(RVA = "0xFBB0", Offset = "0xEFB0", VA = "0x18000FBB0")]
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
[Token(Token = "0x6007978")]
|
||||
[Address(RVA = "0x14610", Offset = "0x13A10", VA = "0x180014610")]
|
||||
[CompilerGenerated]
|
||||
private set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007979 RID: 31097 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007979")]
|
||||
[Address(RVA = "0x145F0", Offset = "0x139F0", VA = "0x1800145F0")]
|
||||
internal void Read(Stream stream)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x0600797A RID: 31098 RVA: 0x001944D4 File Offset: 0x001926D4
|
||||
[Token(Token = "0x600797A")]
|
||||
[Address(RVA = "0x14580", Offset = "0x13980", VA = "0x180014580")]
|
||||
private byte ReadByte(Stream stream)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600797A)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte BestHTTP.WebSocket.Frames.WebSocketFrameReader::ReadByte(System.IO.Stream)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:Exception(var_2_07, call:Exception(ExceptionHelper::ServerClosedTCPStream))
|
||||
}
|
||||
|
||||
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: 0x0600797B RID: 31099 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x600797B")]
|
||||
[Address(RVA = "0x14560", Offset = "0x13960", VA = "0x180014560")]
|
||||
public void Assemble(List<WebSocketFrameReader> fragments)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x0600797C RID: 31100 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x600797C")]
|
||||
[Address(RVA = "0x14570", Offset = "0x13970", VA = "0x180014570")]
|
||||
public void DecodeWithExtensions(WebSocket webSocket)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket.Frames
|
||||
{
|
||||
// Token: 0x020012F0 RID: 4848
|
||||
[Token(Token = "0x20012F0")]
|
||||
[StructLayout(3, Size = 1)]
|
||||
public enum WebSocketFrameTypes : byte
|
||||
{
|
||||
// Token: 0x040057A1 RID: 22433
|
||||
[Token(Token = "0x40057A1")]
|
||||
Continuation,
|
||||
// Token: 0x040057A2 RID: 22434
|
||||
[Token(Token = "0x40057A2")]
|
||||
Text,
|
||||
// Token: 0x040057A3 RID: 22435
|
||||
[Token(Token = "0x40057A3")]
|
||||
Binary,
|
||||
// Token: 0x040057A4 RID: 22436
|
||||
[Token(Token = "0x40057A4")]
|
||||
ConnectionClose = 8,
|
||||
// Token: 0x040057A5 RID: 22437
|
||||
[Token(Token = "0x40057A5")]
|
||||
Ping,
|
||||
// Token: 0x040057A6 RID: 22438
|
||||
[Token(Token = "0x40057A6")]
|
||||
Pong
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,844 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.WebSockets;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BestHTTP.Extensions;
|
||||
using BestHTTP.Logger;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket
|
||||
{
|
||||
// Token: 0x020012CE RID: 4814
|
||||
[Token(Token = "0x20012CE")]
|
||||
[StructLayout(3)]
|
||||
public class NativeWebSocket
|
||||
{
|
||||
// Token: 0x170013A4 RID: 5028
|
||||
// (get) Token: 0x060078B0 RID: 30896 RVA: 0x00191954 File Offset: 0x0018FB54
|
||||
// (set) Token: 0x060078B1 RID: 30897 RVA: 0x00191968 File Offset: 0x0018FB68
|
||||
[Token(Token = "0x170013A4")]
|
||||
public WebSocketStates State
|
||||
{
|
||||
[Token(Token = "0x60078B0")]
|
||||
[Address(RVA = "0x421DE0", Offset = "0x4207E0", VA = "0x180421DE0")]
|
||||
get;
|
||||
[Token(Token = "0x60078B1")]
|
||||
[Address(RVA = "0x421DF0", Offset = "0x4207F0", VA = "0x180421DF0")]
|
||||
private set;
|
||||
} = (WebSocketStates)((ulong)4L);
|
||||
|
||||
// Token: 0x060078B2 RID: 30898 RVA: 0x0019197C File Offset: 0x0018FB7C
|
||||
[Token(Token = "0x60078B2")]
|
||||
[Address(RVA = "0x6F0D40", Offset = "0x6EF740", VA = "0x1806F0D40")]
|
||||
public NativeWebSocket(Uri uri)
|
||||
{
|
||||
ClientWebSocket clientWebSocket = new ClientWebSocket();
|
||||
this._webSocket = clientWebSocket;
|
||||
Queue<NativeWebSocket.OutboundMessage> queue = new Queue();
|
||||
this._outboundMessageQueue = queue;
|
||||
List<ArraySegment<byte>> list = new List();
|
||||
this._inboundFrames = list;
|
||||
List<byte[]> 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] = ":";
|
||||
int num;
|
||||
if (num != 0)
|
||||
{
|
||||
}
|
||||
array[4] = num;
|
||||
string requestPathAndQueryURL = uri.GetRequestPathAndQueryURL();
|
||||
if (requestPathAndQueryURL != 0)
|
||||
{
|
||||
}
|
||||
array[5] = requestPathAndQueryURL;
|
||||
Uri uri2 = new Uri(string.Concat(array));
|
||||
this._uri = uri2;
|
||||
if (BPHGKAEDBPE.KNJJNNNAEKB(uri2))
|
||||
{
|
||||
bool flag3 = DBPPLLLMEGJ.CMJMEEHMHJO(delegate(byte[] token, int length)
|
||||
{
|
||||
string @string = Encoding.UTF8.GetString(token);
|
||||
string text2 = "Bearer " + @string;
|
||||
this._webSocket._options.SetRequestHeader("Authorization", text2);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060078B3 RID: 30899 RVA: 0x00191AC0 File Offset: 0x0018FCC0
|
||||
[Token(Token = "0x60078B3")]
|
||||
[Address(RVA = "0x6F0C60", Offset = "0x6EF660", VA = "0x1806F0C60")]
|
||||
public void SetHeader(string name, string value)
|
||||
{
|
||||
this._webSocket._options.SetRequestHeader(name, value);
|
||||
}
|
||||
|
||||
// Token: 0x060078B4 RID: 30900 RVA: 0x00191AE8 File Offset: 0x0018FCE8
|
||||
[Token(Token = "0x60078B4")]
|
||||
[Address(RVA = "0x6F02A0", Offset = "0x6EECA0", VA = "0x1806F02A0")]
|
||||
public void Open()
|
||||
{
|
||||
Action defaultContextAction = AsyncVoidMethodBuilder.Create().m_coreState.m_defaultContextAction;
|
||||
}
|
||||
|
||||
// Token: 0x060078B5 RID: 30901 RVA: 0x00191B08 File Offset: 0x0018FD08
|
||||
[Token(Token = "0x60078B5")]
|
||||
[Address(RVA = "0x6F01E0", Offset = "0x6EEBE0", VA = "0x1806F01E0")]
|
||||
public void Close()
|
||||
{
|
||||
Action defaultContextAction = AsyncVoidMethodBuilder.Create().m_coreState.m_defaultContextAction;
|
||||
}
|
||||
|
||||
// Token: 0x060078B6 RID: 30902 RVA: 0x00191B28 File Offset: 0x0018FD28
|
||||
[Token(Token = "0x60078B6")]
|
||||
[Address(RVA = "0x6F0110", Offset = "0x6EEB10", VA = "0x1806F0110")]
|
||||
private Task CloseInternal()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060078B7 RID: 30903 RVA: 0x00191B38 File Offset: 0x0018FD38
|
||||
[Token(Token = "0x60078B7")]
|
||||
[Address(RVA = "0x6F0AE0", Offset = "0x6EF4E0", VA = "0x1806F0AE0")]
|
||||
public void Send(string message)
|
||||
{
|
||||
this._webSocket.Dispose();
|
||||
Queue<NativeWebSocket.OutboundMessage> outboundMessageQueue = this._outboundMessageQueue;
|
||||
int num = 0;
|
||||
outboundMessageQueue.Enqueue(num);
|
||||
bool flag = this._outboundMessagePendingEvent.Set();
|
||||
}
|
||||
|
||||
// Token: 0x060078B8 RID: 30904 RVA: 0x00191B74 File Offset: 0x0018FD74
|
||||
[Token(Token = "0x60078B8")]
|
||||
[Address(RVA = "0x6F0BA0", Offset = "0x6EF5A0", VA = "0x1806F0BA0")]
|
||||
public void Send(byte[] message)
|
||||
{
|
||||
this._webSocket.Dispose();
|
||||
Queue<NativeWebSocket.OutboundMessage> outboundMessageQueue = this._outboundMessageQueue;
|
||||
bool flag = this._outboundMessagePendingEvent.Set();
|
||||
}
|
||||
|
||||
// Token: 0x060078B9 RID: 30905 RVA: 0x00191BA8 File Offset: 0x0018FDA8
|
||||
[Token(Token = "0x60078B9")]
|
||||
[Address(RVA = "0x6F0A00", Offset = "0x6EF400", VA = "0x1806F0A00")]
|
||||
private Task SendLoop(CancellationToken cancellationToken)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060078BA RID: 30906 RVA: 0x00191BB8 File Offset: 0x0018FDB8
|
||||
[Token(Token = "0x60078BA")]
|
||||
[Address(RVA = "0x6F0350", Offset = "0x6EED50", VA = "0x1806F0350")]
|
||||
private Task ReceiveLoop()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060078BB RID: 30907 RVA: 0x00191BC8 File Offset: 0x0018FDC8
|
||||
[Token(Token = "0x60078BB")]
|
||||
[Address(RVA = "0x6F0420", Offset = "0x6EEE20", VA = "0x1806F0420")]
|
||||
private Task<NativeWebSocket.InboundMessage> Receive()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060078BB)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Threading.Tasks.Task`1<BestHTTP.WebSocket.NativeWebSocket/InboundMessage> BestHTTP.WebSocket.NativeWebSocket::Receive()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:AsyncTaskMethodBuilder`1(var_3_0B, call:AsyncTaskMethodBuilder`1(AsyncTaskMethodBuilder`1::Create))
|
||||
}
|
||||
|
||||
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: 0x060078BC RID: 30908 RVA: 0x00191BE0 File Offset: 0x0018FDE0
|
||||
[Token(Token = "0x60078BC")]
|
||||
[Address(RVA = "0x6F0940", Offset = "0x6EF340", VA = "0x1806F0940")]
|
||||
private void SafeRaiseOnOpen()
|
||||
{
|
||||
NativeWebSocket.OnWebSocketOpenDelegate onOpen = this.OnOpen;
|
||||
if (onOpen != 0)
|
||||
{
|
||||
onOpen(this);
|
||||
}
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
}
|
||||
|
||||
// Token: 0x060078BD RID: 30909 RVA: 0x00191C10 File Offset: 0x0018FE10
|
||||
[Token(Token = "0x60078BD")]
|
||||
[Address(RVA = "0x6F0870", Offset = "0x6EF270", VA = "0x1806F0870")]
|
||||
private void SafeRaiseOnMessage(string message)
|
||||
{
|
||||
NativeWebSocket.OnWebSocketMessageDelegate onMessage = this.OnMessage;
|
||||
if (onMessage != 0)
|
||||
{
|
||||
onMessage(this, message);
|
||||
}
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
}
|
||||
|
||||
// Token: 0x060078BE RID: 30910 RVA: 0x00191C40 File Offset: 0x0018FE40
|
||||
[Token(Token = "0x60078BE")]
|
||||
[Address(RVA = "0x6F0510", Offset = "0x6EEF10", VA = "0x1806F0510")]
|
||||
private void SafeRaiseOnBinary(byte[] message)
|
||||
{
|
||||
NativeWebSocket.OnWebSocketBinaryDelegate onBinary = this.OnBinary;
|
||||
if (onBinary != 0)
|
||||
{
|
||||
onBinary(this, message);
|
||||
}
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
}
|
||||
|
||||
// Token: 0x060078BF RID: 30911 RVA: 0x00191C70 File Offset: 0x0018FE70
|
||||
[Token(Token = "0x60078BF")]
|
||||
[Address(RVA = "0x6F05E0", Offset = "0x6EEFE0", VA = "0x1806F05E0")]
|
||||
private void SafeRaiseOnClosed(ushort statusCode, string statusMessage)
|
||||
{
|
||||
NativeWebSocket.OnWebSocketClosedDelegate onClosed = this.OnClosed;
|
||||
if (onClosed != 0)
|
||||
{
|
||||
onClosed(this, statusCode, statusMessage);
|
||||
}
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
}
|
||||
|
||||
// Token: 0x060078C0 RID: 30912 RVA: 0x00191CA0 File Offset: 0x0018FEA0
|
||||
[Token(Token = "0x60078C0")]
|
||||
[Address(RVA = "0x6F07A0", Offset = "0x6EF1A0", VA = "0x1806F07A0")]
|
||||
private void SafeRaiseOnError(Exception exception)
|
||||
{
|
||||
NativeWebSocket.OnWebSocketErrorDelegate onError = this.OnError;
|
||||
if (onError != 0)
|
||||
{
|
||||
onError(this, exception);
|
||||
}
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
}
|
||||
|
||||
// Token: 0x060078C1 RID: 30913 RVA: 0x00191CD0 File Offset: 0x0018FED0
|
||||
[Token(Token = "0x60078C1")]
|
||||
[Address(RVA = "0x6F06D0", Offset = "0x6EF0D0", VA = "0x1806F06D0")]
|
||||
private void SafeRaiseOnErrorDesc(string errorDescription)
|
||||
{
|
||||
NativeWebSocket.OnWebSocketErrorDescriptionDelegate onErrorDesc = this.OnErrorDesc;
|
||||
if (onErrorDesc != 0)
|
||||
{
|
||||
onErrorDesc(this, errorDescription);
|
||||
}
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
}
|
||||
|
||||
// Token: 0x04005707 RID: 22279
|
||||
[Token(Token = "0x4005707")]
|
||||
private const int MaxFragmentSize = 32767;
|
||||
|
||||
// Token: 0x04005708 RID: 22280
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005708")]
|
||||
public NativeWebSocket.OnWebSocketOpenDelegate OnOpen;
|
||||
|
||||
// Token: 0x04005709 RID: 22281
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005709")]
|
||||
public NativeWebSocket.OnWebSocketMessageDelegate OnMessage;
|
||||
|
||||
// Token: 0x0400570A RID: 22282
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400570A")]
|
||||
public NativeWebSocket.OnWebSocketBinaryDelegate OnBinary;
|
||||
|
||||
// Token: 0x0400570B RID: 22283
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400570B")]
|
||||
public NativeWebSocket.OnWebSocketClosedDelegate OnClosed;
|
||||
|
||||
// Token: 0x0400570C RID: 22284
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400570C")]
|
||||
public NativeWebSocket.OnWebSocketErrorDelegate OnError;
|
||||
|
||||
// Token: 0x0400570D RID: 22285
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400570D")]
|
||||
public NativeWebSocket.OnWebSocketErrorDescriptionDelegate OnErrorDesc;
|
||||
|
||||
// Token: 0x0400570F RID: 22287
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x400570F")]
|
||||
private readonly Uri _uri;
|
||||
|
||||
// Token: 0x04005710 RID: 22288
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4005710")]
|
||||
private readonly ClientWebSocket _webSocket;
|
||||
|
||||
// Token: 0x04005711 RID: 22289
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x4005711")]
|
||||
private readonly Queue<NativeWebSocket.OutboundMessage> _outboundMessageQueue;
|
||||
|
||||
// Token: 0x04005712 RID: 22290
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x4005712")]
|
||||
private readonly List<ArraySegment<byte>> _inboundFrames;
|
||||
|
||||
// Token: 0x04005713 RID: 22291
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x4005713")]
|
||||
private readonly List<byte[]> _rentedBuffers;
|
||||
|
||||
// Token: 0x04005714 RID: 22292
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x4005714")]
|
||||
private CancellationTokenSource _sendLoopCancellationTokenSource;
|
||||
|
||||
// Token: 0x04005715 RID: 22293
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x4005715")]
|
||||
private AutoResetEvent _outboundMessagePendingEvent;
|
||||
|
||||
// Token: 0x020012CF RID: 4815
|
||||
[Token(Token = "0x20012CF")]
|
||||
private struct OutboundMessage
|
||||
{
|
||||
// Token: 0x060078C3 RID: 30915 RVA: 0x00191D44 File Offset: 0x0018FF44
|
||||
[Token(Token = "0x60078C3")]
|
||||
[Address(RVA = "0x141E0", Offset = "0x135E0", VA = "0x1800141E0")]
|
||||
public OutboundMessage(byte[] binaryMessage)
|
||||
{
|
||||
this.TextMessage = (ulong)1L;
|
||||
}
|
||||
|
||||
// Token: 0x060078C4 RID: 30916 RVA: 0x00191D5C File Offset: 0x0018FF5C
|
||||
[Token(Token = "0x60078C4")]
|
||||
[Address(RVA = "0x14200", Offset = "0x13600", VA = "0x180014200")]
|
||||
public OutboundMessage(string textMessage)
|
||||
{
|
||||
int num = 0;
|
||||
this.TextMessage = num;
|
||||
}
|
||||
|
||||
// Token: 0x04005716 RID: 22294
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x4005716")]
|
||||
public readonly WebSocketMessageType MessageType;
|
||||
|
||||
// Token: 0x04005717 RID: 22295
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x8")]
|
||||
[Token(Token = "0x4005717")]
|
||||
public readonly byte[] BinaryMessage;
|
||||
|
||||
// Token: 0x04005718 RID: 22296
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005718")]
|
||||
public readonly string TextMessage;
|
||||
}
|
||||
|
||||
// Token: 0x020012D0 RID: 4816
|
||||
[Token(Token = "0x20012D0")]
|
||||
private struct InboundMessage
|
||||
{
|
||||
// Token: 0x060078C5 RID: 30917 RVA: 0x00191D74 File Offset: 0x0018FF74
|
||||
[Token(Token = "0x60078C5")]
|
||||
[Address(RVA = "0x14130", Offset = "0x13530", VA = "0x180014130")]
|
||||
public InboundMessage(byte[] binaryMessage)
|
||||
{
|
||||
this.CloseStatus = binaryMessage;
|
||||
int num = 0;
|
||||
this.TextMessage = (ulong)1L;
|
||||
this.CloseStatusDescription = num;
|
||||
}
|
||||
|
||||
// Token: 0x060078C6 RID: 30918 RVA: 0x00191D9C File Offset: 0x0018FF9C
|
||||
[Token(Token = "0x60078C6")]
|
||||
[Address(RVA = "0x14110", Offset = "0x13510", VA = "0x180014110")]
|
||||
public InboundMessage(string textMessage)
|
||||
{
|
||||
int num = 0;
|
||||
this.CloseStatusDescription = textMessage;
|
||||
this.TextMessage = num;
|
||||
this.CloseStatus = num;
|
||||
}
|
||||
|
||||
// Token: 0x060078C7 RID: 30919 RVA: 0x00191DC4 File Offset: 0x0018FFC4
|
||||
[Token(Token = "0x60078C7")]
|
||||
[Address(RVA = "0x14150", Offset = "0x13550", VA = "0x180014150")]
|
||||
public InboundMessage(WebSocketCloseStatus? closeStatus, string closeStatusDescription)
|
||||
{
|
||||
int num = 0;
|
||||
this.TextMessage = (ulong)2L;
|
||||
this.CloseStatus = num;
|
||||
this.CloseStatusDescription = num;
|
||||
}
|
||||
|
||||
// Token: 0x04005719 RID: 22297
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x4005719")]
|
||||
public readonly WebSocketMessageType MessageType;
|
||||
|
||||
// Token: 0x0400571A RID: 22298
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x8")]
|
||||
[Token(Token = "0x400571A")]
|
||||
public readonly byte[] BinaryMessage;
|
||||
|
||||
// Token: 0x0400571B RID: 22299
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400571B")]
|
||||
public readonly string TextMessage;
|
||||
|
||||
// Token: 0x0400571C RID: 22300
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400571C")]
|
||||
public readonly WebSocketCloseStatus? CloseStatus;
|
||||
|
||||
// Token: 0x0400571D RID: 22301
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400571D")]
|
||||
public readonly string CloseStatusDescription;
|
||||
}
|
||||
|
||||
// Token: 0x020012D1 RID: 4817
|
||||
[Token(Token = "0x20012D1")]
|
||||
public sealed class OnWebSocketOpenDelegate : MulticastDelegate
|
||||
{
|
||||
// Token: 0x060078C8 RID: 30920 RVA: 0x00191DEC File Offset: 0x0018FFEC
|
||||
[Token(Token = "0x60078C8")]
|
||||
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
|
||||
public OnWebSocketOpenDelegate(object @object, IntPtr method)
|
||||
{
|
||||
this.method = method;
|
||||
this.m_target = @object;
|
||||
}
|
||||
|
||||
// Token: 0x060078C9 RID: 30921 RVA: 0x00191E08 File Offset: 0x00190008
|
||||
[Token(Token = "0x60078C9")]
|
||||
[Address(RVA = "0x6F1D00", Offset = "0x6F0700", VA = "0x1806F1D00", Slot = "13")]
|
||||
public void Invoke(NativeWebSocket webSocket)
|
||||
{
|
||||
if (this.delegates != 0)
|
||||
{
|
||||
}
|
||||
uint num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
throw new ExecutionEngineException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060078CA RID: 30922 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078CA")]
|
||||
[Address(RVA = "0x42BD30", Offset = "0x42A730", VA = "0x18042BD30", 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: 0x060078CB RID: 30923 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078CB")]
|
||||
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
|
||||
public void EndInvoke(IAsyncResult result)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x020012D2 RID: 4818
|
||||
[Token(Token = "0x20012D2")]
|
||||
public sealed class OnWebSocketMessageDelegate : MulticastDelegate
|
||||
{
|
||||
// Token: 0x060078CC RID: 30924 RVA: 0x00191EC4 File Offset: 0x001900C4
|
||||
[Token(Token = "0x60078CC")]
|
||||
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
|
||||
public OnWebSocketMessageDelegate(object @object, IntPtr method)
|
||||
{
|
||||
this.method = method;
|
||||
this.m_target = @object;
|
||||
}
|
||||
|
||||
// Token: 0x060078CD RID: 30925 RVA: 0x00191EE0 File Offset: 0x001900E0
|
||||
[Token(Token = "0x60078CD")]
|
||||
[Address(RVA = "0x6F2630", Offset = "0x6F1030", VA = "0x1806F2630", Slot = "13")]
|
||||
public void Invoke(NativeWebSocket webSocket, string message)
|
||||
{
|
||||
if (this.delegates != 0)
|
||||
{
|
||||
}
|
||||
uint num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
throw new ExecutionEngineException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060078CE RID: 30926 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078CE")]
|
||||
[Address(RVA = "0x4330B0", Offset = "0x431AB0", VA = "0x1804330B0", 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: 0x060078CF RID: 30927 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078CF")]
|
||||
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
|
||||
public void EndInvoke(IAsyncResult result)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x020012D3 RID: 4819
|
||||
[Token(Token = "0x20012D3")]
|
||||
public sealed class OnWebSocketBinaryDelegate : MulticastDelegate
|
||||
{
|
||||
// Token: 0x060078D0 RID: 30928 RVA: 0x00191F40 File Offset: 0x00190140
|
||||
[Token(Token = "0x60078D0")]
|
||||
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
|
||||
public OnWebSocketBinaryDelegate(object @object, IntPtr method)
|
||||
{
|
||||
this.method = method;
|
||||
this.m_target = @object;
|
||||
}
|
||||
|
||||
// Token: 0x060078D1 RID: 30929 RVA: 0x00191F5C File Offset: 0x0019015C
|
||||
[Token(Token = "0x60078D1")]
|
||||
[Address(RVA = "0x6F1930", Offset = "0x6F0330", VA = "0x1806F1930", Slot = "13")]
|
||||
public void Invoke(NativeWebSocket webSocket, byte[] data)
|
||||
{
|
||||
if (this.delegates != 0)
|
||||
{
|
||||
}
|
||||
uint num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
throw new ExecutionEngineException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060078D2 RID: 30930 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078D2")]
|
||||
[Address(RVA = "0x4330B0", Offset = "0x431AB0", VA = "0x1804330B0", 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: 0x060078D3 RID: 30931 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078D3")]
|
||||
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
|
||||
public void EndInvoke(IAsyncResult result)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x020012D4 RID: 4820
|
||||
[Token(Token = "0x20012D4")]
|
||||
public sealed class OnWebSocketClosedDelegate : MulticastDelegate
|
||||
{
|
||||
// Token: 0x060078D4 RID: 30932 RVA: 0x0019202C File Offset: 0x0019022C
|
||||
[Token(Token = "0x60078D4")]
|
||||
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
|
||||
public OnWebSocketClosedDelegate(object @object, IntPtr method)
|
||||
{
|
||||
this.method = method;
|
||||
this.m_target = @object;
|
||||
}
|
||||
|
||||
// Token: 0x060078D5 RID: 30933 RVA: 0x00192048 File Offset: 0x00190248
|
||||
[Token(Token = "0x60078D5")]
|
||||
[Address(RVA = "0x6F21C0", Offset = "0x6F0BC0", VA = "0x1806F21C0", 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: 0x060078D6 RID: 30934 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078D6")]
|
||||
[Address(RVA = "0x6F2080", Offset = "0x6F0A80", VA = "0x1806F2080", 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: 0x060078D7 RID: 30935 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078D7")]
|
||||
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
|
||||
public void EndInvoke(IAsyncResult result)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x020012D5 RID: 4821
|
||||
[Token(Token = "0x20012D5")]
|
||||
public sealed class OnWebSocketErrorDelegate : MulticastDelegate
|
||||
{
|
||||
// Token: 0x060078D8 RID: 30936 RVA: 0x001920F4 File Offset: 0x001902F4
|
||||
[Token(Token = "0x60078D8")]
|
||||
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
|
||||
public OnWebSocketErrorDelegate(object @object, IntPtr method)
|
||||
{
|
||||
this.method = method;
|
||||
this.m_target = @object;
|
||||
}
|
||||
|
||||
// Token: 0x060078D9 RID: 30937 RVA: 0x00192110 File Offset: 0x00190310
|
||||
[Token(Token = "0x60078D9")]
|
||||
[Address(RVA = "0x6F1930", Offset = "0x6F0330", VA = "0x1806F1930", Slot = "13")]
|
||||
public void Invoke(NativeWebSocket webSocket, Exception ex)
|
||||
{
|
||||
if (this.delegates != 0)
|
||||
{
|
||||
}
|
||||
uint num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
throw new ExecutionEngineException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060078DA RID: 30938 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078DA")]
|
||||
[Address(RVA = "0x4330B0", Offset = "0x431AB0", VA = "0x1804330B0", 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: 0x060078DB RID: 30939 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078DB")]
|
||||
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
|
||||
public void EndInvoke(IAsyncResult result)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x020012D6 RID: 4822
|
||||
[Token(Token = "0x20012D6")]
|
||||
public sealed class OnWebSocketErrorDescriptionDelegate : MulticastDelegate
|
||||
{
|
||||
// Token: 0x060078DC RID: 30940 RVA: 0x001921D4 File Offset: 0x001903D4
|
||||
[Token(Token = "0x60078DC")]
|
||||
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
|
||||
public OnWebSocketErrorDescriptionDelegate(object @object, IntPtr method)
|
||||
{
|
||||
this.method = method;
|
||||
this.m_target = @object;
|
||||
}
|
||||
|
||||
// Token: 0x060078DD RID: 30941 RVA: 0x001921F0 File Offset: 0x001903F0
|
||||
[Token(Token = "0x60078DD")]
|
||||
[Address(RVA = "0x6F2630", Offset = "0x6F1030", VA = "0x1806F2630", Slot = "13")]
|
||||
public void Invoke(NativeWebSocket webSocket, string reason)
|
||||
{
|
||||
if (this.delegates != 0)
|
||||
{
|
||||
}
|
||||
uint num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
throw new ExecutionEngineException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060078DE RID: 30942 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078DE")]
|
||||
[Address(RVA = "0x4330B0", Offset = "0x431AB0", VA = "0x1804330B0", 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: 0x060078DF RID: 30943 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078DF")]
|
||||
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
|
||||
public void EndInvoke(IAsyncResult result)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x020012D7 RID: 4823
|
||||
[Token(Token = "0x20012D7")]
|
||||
public static class WaitHandleAsyncFactory
|
||||
{
|
||||
// Token: 0x060078E0 RID: 30944 RVA: 0x00192250 File Offset: 0x00190450
|
||||
[Token(Token = "0x60078E0")]
|
||||
[Address(RVA = "0x6F7FF0", Offset = "0x6F69F0", VA = "0x1806F7FF0")]
|
||||
public static Task FromWaitHandle(WaitHandle handle)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060078E1 RID: 30945 RVA: 0x00192260 File Offset: 0x00190460
|
||||
[Token(Token = "0x60078E1")]
|
||||
[Address(RVA = "0x6F7C80", Offset = "0x6F6680", VA = "0x1806F7C80")]
|
||||
public static Task<bool> FromWaitHandle(WaitHandle handle, TimeSpan timeout)
|
||||
{
|
||||
Task<bool> task;
|
||||
return task;
|
||||
}
|
||||
|
||||
// Token: 0x060078E2 RID: 30946 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078E2")]
|
||||
[Address(RVA = "0x6F7BE0", Offset = "0x6F65E0", VA = "0x1806F7BE0")]
|
||||
public static Task FromWaitHandle(WaitHandle handle, CancellationToken token)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x060078E3 RID: 30947 RVA: 0x00192270 File Offset: 0x00190470
|
||||
[Token(Token = "0x60078E3")]
|
||||
[Address(RVA = "0x6F7D20", Offset = "0x6F6720", VA = "0x1806F7D20")]
|
||||
public static Task<bool> FromWaitHandle(WaitHandle handle, TimeSpan timeout, CancellationToken token)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060078E3)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Threading.Tasks.Task`1<System.Boolean> 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_3C:
|
||||
stloc:ArgumentNullException(var_7_46, 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: 0x060078E4 RID: 30948 RVA: 0x001922C4 File Offset: 0x001904C4
|
||||
[Token(Token = "0x60078E4")]
|
||||
[Address(RVA = "0x6F7AE0", Offset = "0x6F64E0", VA = "0x1806F7AE0")]
|
||||
private static Task<bool> DoFromWaitHandle(WaitHandle handle, TimeSpan timeout, CancellationToken token)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060078E4)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Threading.Tasks.Task`1<System.Boolean> BestHTTP.WebSocket.NativeWebSocket/WaitHandleAsyncFactory::DoFromWaitHandle(System.Threading.WaitHandle,System.TimeSpan,System.Threading.CancellationToken)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:AsyncTaskMethodBuilder`1(var_1_07, call:AsyncTaskMethodBuilder`1(AsyncTaskMethodBuilder`1::Create))
|
||||
}
|
||||
|
||||
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: 0x060078E5 RID: 30949 RVA: 0x001922D8 File Offset: 0x001904D8
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x60078E5")]
|
||||
[Address(RVA = "0x6F80C0", Offset = "0x6F6AC0", VA = "0x1806F80C0")]
|
||||
static WaitHandleAsyncFactory()
|
||||
{
|
||||
Task<bool> task = Task.FromResult<bool>(true);
|
||||
int num = 0;
|
||||
NativeWebSocket.WaitHandleAsyncFactory.CompletedTaskTrue = task;
|
||||
NativeWebSocket.WaitHandleAsyncFactory.CompletedTaskFalse = Task.FromResult<bool>(num != 0);
|
||||
Task<bool> task2;
|
||||
NativeWebSocket.WaitHandleAsyncFactory.CancelledTask = task2;
|
||||
}
|
||||
|
||||
// Token: 0x0400571E RID: 22302
|
||||
[Token(Token = "0x400571E")]
|
||||
private static Task<bool> CompletedTaskTrue;
|
||||
|
||||
// Token: 0x0400571F RID: 22303
|
||||
[Token(Token = "0x400571F")]
|
||||
private static Task<bool> CompletedTaskFalse;
|
||||
|
||||
// Token: 0x04005720 RID: 22304
|
||||
[Token(Token = "0x4005720")]
|
||||
private static Task<bool> CancelledTask;
|
||||
|
||||
// Token: 0x020012D8 RID: 4824
|
||||
[Token(Token = "0x20012D8")]
|
||||
private sealed class ThreadPoolRegistration : IDisposable
|
||||
{
|
||||
// Token: 0x060078E6 RID: 30950 RVA: 0x0003C3EA File Offset: 0x0003A5EA
|
||||
[Token(Token = "0x60078E6")]
|
||||
[Address(RVA = "0x6F4A70", Offset = "0x6F3470", VA = "0x1806F4A70")]
|
||||
public ThreadPoolRegistration(WaitHandle handle, TimeSpan timeout, TaskCompletionSource<bool> tcs)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060078E7 RID: 30951 RVA: 0x0003C3EA File Offset: 0x0003A5EA
|
||||
[Token(Token = "0x60078E7")]
|
||||
[Address(RVA = "0x6F4A40", Offset = "0x6F3440", VA = "0x1806F4A40", Slot = "4")]
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04005721 RID: 22305
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005721")]
|
||||
private readonly RegisteredWaitHandle _registeredWaitHandle;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket
|
||||
{
|
||||
// Token: 0x020012E5 RID: 4837
|
||||
[Token(Token = "0x20012E5")]
|
||||
[StructLayout(3, Size = 8)]
|
||||
public sealed class OnWebSocketBinaryDelegate : MulticastDelegate
|
||||
{
|
||||
// Token: 0x06007904 RID: 30980 RVA: 0x00192434 File Offset: 0x00190634
|
||||
[Token(Token = "0x6007904")]
|
||||
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
|
||||
public OnWebSocketBinaryDelegate(object @object, IntPtr method)
|
||||
{
|
||||
this.method = method;
|
||||
this.m_target = @object;
|
||||
}
|
||||
|
||||
// Token: 0x06007905 RID: 30981 RVA: 0x00192450 File Offset: 0x00190650
|
||||
[Token(Token = "0x6007905")]
|
||||
[Address(RVA = "0x6F1930", Offset = "0x6F0330", VA = "0x1806F1930", Slot = "13")]
|
||||
public void Invoke(WebSocket webSocket, byte[] data)
|
||||
{
|
||||
if (this.delegates != 0)
|
||||
{
|
||||
}
|
||||
uint num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
throw new ExecutionEngineException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007906 RID: 30982 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007906")]
|
||||
[Address(RVA = "0x4330B0", Offset = "0x431AB0", VA = "0x1804330B0", Slot = "14")]
|
||||
public IAsyncResult BeginInvoke(WebSocket webSocket, byte[] data, AsyncCallback callback, object @object)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06007907 RID: 30983 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007907")]
|
||||
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
|
||||
public void EndInvoke(IAsyncResult result)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket
|
||||
{
|
||||
// Token: 0x020012E6 RID: 4838
|
||||
[Token(Token = "0x20012E6")]
|
||||
[StructLayout(3, Size = 8)]
|
||||
public sealed class OnWebSocketClosedDelegate : MulticastDelegate
|
||||
{
|
||||
// Token: 0x06007908 RID: 30984 RVA: 0x00192520 File Offset: 0x00190720
|
||||
[Token(Token = "0x6007908")]
|
||||
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
|
||||
public OnWebSocketClosedDelegate(object @object, IntPtr method)
|
||||
{
|
||||
this.method = method;
|
||||
this.m_target = @object;
|
||||
}
|
||||
|
||||
// Token: 0x06007909 RID: 30985 RVA: 0x0019253C File Offset: 0x0019073C
|
||||
[Token(Token = "0x6007909")]
|
||||
[Address(RVA = "0x6F21C0", Offset = "0x6F0BC0", VA = "0x1806F21C0", Slot = "13")]
|
||||
public void Invoke(WebSocket webSocket, ushort code, string message)
|
||||
{
|
||||
if (this.delegates != 0)
|
||||
{
|
||||
}
|
||||
uint num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
throw new ExecutionEngineException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600790A RID: 30986 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x600790A")]
|
||||
[Address(RVA = "0x6F2120", Offset = "0x6F0B20", VA = "0x1806F2120", Slot = "14")]
|
||||
public IAsyncResult BeginInvoke(WebSocket webSocket, ushort code, string message, AsyncCallback callback, object @object)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x0600790B RID: 30987 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x600790B")]
|
||||
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
|
||||
public void EndInvoke(IAsyncResult result)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket
|
||||
{
|
||||
// Token: 0x020012E7 RID: 4839
|
||||
[Token(Token = "0x20012E7")]
|
||||
[StructLayout(3, Size = 8)]
|
||||
public sealed class OnWebSocketErrorDelegate : MulticastDelegate
|
||||
{
|
||||
// Token: 0x0600790C RID: 30988 RVA: 0x001925E8 File Offset: 0x001907E8
|
||||
[Token(Token = "0x600790C")]
|
||||
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
|
||||
public OnWebSocketErrorDelegate(object @object, IntPtr method)
|
||||
{
|
||||
this.method = method;
|
||||
this.m_target = @object;
|
||||
}
|
||||
|
||||
// Token: 0x0600790D RID: 30989 RVA: 0x00192604 File Offset: 0x00190804
|
||||
[Token(Token = "0x600790D")]
|
||||
[Address(RVA = "0x6F1930", Offset = "0x6F0330", VA = "0x1806F1930", Slot = "13")]
|
||||
public void Invoke(WebSocket webSocket, Exception ex)
|
||||
{
|
||||
if (this.delegates != 0)
|
||||
{
|
||||
}
|
||||
uint num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
throw new ExecutionEngineException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600790E RID: 30990 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x600790E")]
|
||||
[Address(RVA = "0x4330B0", Offset = "0x431AB0", VA = "0x1804330B0", Slot = "14")]
|
||||
public IAsyncResult BeginInvoke(WebSocket webSocket, Exception ex, AsyncCallback callback, object @object)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x0600790F RID: 30991 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x600790F")]
|
||||
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
|
||||
public void EndInvoke(IAsyncResult result)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket
|
||||
{
|
||||
// Token: 0x020012E8 RID: 4840
|
||||
[Token(Token = "0x20012E8")]
|
||||
[StructLayout(3, Size = 8)]
|
||||
public sealed class OnWebSocketErrorDescriptionDelegate : MulticastDelegate
|
||||
{
|
||||
// Token: 0x06007910 RID: 30992 RVA: 0x001926C8 File Offset: 0x001908C8
|
||||
[Token(Token = "0x6007910")]
|
||||
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
|
||||
public OnWebSocketErrorDescriptionDelegate(object @object, IntPtr method)
|
||||
{
|
||||
this.method = method;
|
||||
this.m_target = @object;
|
||||
}
|
||||
|
||||
// Token: 0x06007911 RID: 30993 RVA: 0x001926E4 File Offset: 0x001908E4
|
||||
[Token(Token = "0x6007911")]
|
||||
[Address(RVA = "0x6F2630", Offset = "0x6F1030", VA = "0x1806F2630", Slot = "13")]
|
||||
public void Invoke(WebSocket webSocket, string reason)
|
||||
{
|
||||
if (this.delegates != 0)
|
||||
{
|
||||
}
|
||||
uint num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
throw new ExecutionEngineException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007912 RID: 30994 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007912")]
|
||||
[Address(RVA = "0x4330B0", Offset = "0x431AB0", VA = "0x1804330B0", Slot = "14")]
|
||||
public IAsyncResult BeginInvoke(WebSocket webSocket, string reason, AsyncCallback callback, object @object)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06007913 RID: 30995 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007913")]
|
||||
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
|
||||
public void EndInvoke(IAsyncResult result)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.WebSocket.Frames;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket
|
||||
{
|
||||
// Token: 0x020012E9 RID: 4841
|
||||
[Token(Token = "0x20012E9")]
|
||||
[StructLayout(3, Size = 8)]
|
||||
public sealed class OnWebSocketIncompleteFrameDelegate : MulticastDelegate
|
||||
{
|
||||
// Token: 0x06007914 RID: 30996 RVA: 0x00192744 File Offset: 0x00190944
|
||||
[Token(Token = "0x6007914")]
|
||||
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
|
||||
public OnWebSocketIncompleteFrameDelegate(object @object, IntPtr method)
|
||||
{
|
||||
this.method = method;
|
||||
this.m_target = @object;
|
||||
}
|
||||
|
||||
// Token: 0x06007915 RID: 30997 RVA: 0x00192760 File Offset: 0x00190960
|
||||
[Token(Token = "0x6007915")]
|
||||
[Address(RVA = "0x6F2990", Offset = "0x6F1390", VA = "0x1806F2990", Slot = "13")]
|
||||
public void Invoke(WebSocket webSocket, WebSocketFrameReader frame)
|
||||
{
|
||||
if (this.delegates != 0)
|
||||
{
|
||||
}
|
||||
uint num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
throw new ExecutionEngineException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007916 RID: 30998 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007916")]
|
||||
[Address(RVA = "0x6F2900", Offset = "0x6F1300", VA = "0x1806F2900", Slot = "14")]
|
||||
public IAsyncResult BeginInvoke(WebSocket webSocket, WebSocketFrameReader frame, AsyncCallback callback, object @object)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06007917 RID: 30999 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007917")]
|
||||
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
|
||||
public void EndInvoke(IAsyncResult result)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket
|
||||
{
|
||||
// Token: 0x020012E4 RID: 4836
|
||||
[Token(Token = "0x20012E4")]
|
||||
[StructLayout(3, Size = 8)]
|
||||
public sealed class OnWebSocketMessageDelegate : MulticastDelegate
|
||||
{
|
||||
// Token: 0x06007900 RID: 30976 RVA: 0x001923B8 File Offset: 0x001905B8
|
||||
[Token(Token = "0x6007900")]
|
||||
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
|
||||
public OnWebSocketMessageDelegate(object @object, IntPtr method)
|
||||
{
|
||||
this.method = method;
|
||||
this.m_target = @object;
|
||||
}
|
||||
|
||||
// Token: 0x06007901 RID: 30977 RVA: 0x001923D4 File Offset: 0x001905D4
|
||||
[Token(Token = "0x6007901")]
|
||||
[Address(RVA = "0x6F2630", Offset = "0x6F1030", VA = "0x1806F2630", Slot = "13")]
|
||||
public void Invoke(WebSocket webSocket, string message)
|
||||
{
|
||||
if (this.delegates != 0)
|
||||
{
|
||||
}
|
||||
uint num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
throw new ExecutionEngineException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007902 RID: 30978 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007902")]
|
||||
[Address(RVA = "0x4330B0", Offset = "0x431AB0", VA = "0x1804330B0", Slot = "14")]
|
||||
public IAsyncResult BeginInvoke(WebSocket webSocket, string message, AsyncCallback callback, object @object)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06007903 RID: 30979 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007903")]
|
||||
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
|
||||
public void EndInvoke(IAsyncResult result)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket
|
||||
{
|
||||
// Token: 0x020012E3 RID: 4835
|
||||
[Token(Token = "0x20012E3")]
|
||||
[StructLayout(3, Size = 8)]
|
||||
public sealed class OnWebSocketOpenDelegate : MulticastDelegate
|
||||
{
|
||||
// Token: 0x060078FC RID: 30972 RVA: 0x00192308 File Offset: 0x00190508
|
||||
[Token(Token = "0x60078FC")]
|
||||
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
|
||||
public OnWebSocketOpenDelegate(object @object, IntPtr method)
|
||||
{
|
||||
this.method = method;
|
||||
this.m_target = @object;
|
||||
}
|
||||
|
||||
// Token: 0x060078FD RID: 30973 RVA: 0x00192324 File Offset: 0x00190524
|
||||
[Token(Token = "0x60078FD")]
|
||||
[Address(RVA = "0x6F3010", Offset = "0x6F1A10", VA = "0x1806F3010", Slot = "13")]
|
||||
public void Invoke(WebSocket webSocket)
|
||||
{
|
||||
if (this.delegates != 0)
|
||||
{
|
||||
}
|
||||
uint num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
throw new ExecutionEngineException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060078FE RID: 30974 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078FE")]
|
||||
[Address(RVA = "0x42BD30", Offset = "0x42A730", VA = "0x18042BD30", Slot = "14")]
|
||||
public IAsyncResult BeginInvoke(WebSocket webSocket, AsyncCallback callback, object @object)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x060078FF RID: 30975 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60078FF")]
|
||||
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
|
||||
public void EndInvoke(IAsyncResult result)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,651 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using BestHTTP.Decompression.Zlib;
|
||||
using BestHTTP.Extensions;
|
||||
using BestHTTP.Logger;
|
||||
using BestHTTP.WebSocket.Extensions;
|
||||
using BestHTTP.WebSocket.Frames;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket
|
||||
{
|
||||
// Token: 0x020012EA RID: 4842
|
||||
[Token(Token = "0x20012EA")]
|
||||
[StructLayout(3)]
|
||||
public sealed class WebSocket
|
||||
{
|
||||
// Token: 0x170013A5 RID: 5029
|
||||
// (get) Token: 0x06007918 RID: 31000 RVA: 0x001928A4 File Offset: 0x00190AA4
|
||||
// (set) Token: 0x06007919 RID: 31001 RVA: 0x001928B8 File Offset: 0x00190AB8
|
||||
[Token(Token = "0x170013A5")]
|
||||
public WebSocketStates State
|
||||
{
|
||||
[Token(Token = "0x6007918")]
|
||||
[Address(RVA = "0x559440", Offset = "0x557E40", VA = "0x180559440")]
|
||||
get;
|
||||
[Token(Token = "0x6007919")]
|
||||
[Address(RVA = "0x559450", Offset = "0x557E50", VA = "0x180559450")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013A6 RID: 5030
|
||||
// (get) Token: 0x0600791A RID: 31002 RVA: 0x001928CC File Offset: 0x00190ACC
|
||||
[Token(Token = "0x170013A6")]
|
||||
public bool IsOpen
|
||||
{
|
||||
[Token(Token = "0x600791A")]
|
||||
[Address(RVA = "0x6FFDC0", Offset = "0x6FE7C0", VA = "0x1806FFDC0")]
|
||||
get
|
||||
{
|
||||
WebSocketResponse webSocketResponse = this.webSocket;
|
||||
if (webSocketResponse == 0)
|
||||
{
|
||||
}
|
||||
return !webSocketResponse.closed;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170013A7 RID: 5031
|
||||
// (get) Token: 0x0600791B RID: 31003 RVA: 0x001928F0 File Offset: 0x00190AF0
|
||||
[Token(Token = "0x170013A7")]
|
||||
public int BufferedAmount
|
||||
{
|
||||
[Token(Token = "0x600791B")]
|
||||
[Address(RVA = "0x6FFDA0", Offset = "0x6FE7A0", VA = "0x1806FFDA0")]
|
||||
get
|
||||
{
|
||||
return this.webSocket._bufferedAmount;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170013A8 RID: 5032
|
||||
// (get) Token: 0x0600791C RID: 31004 RVA: 0x00192910 File Offset: 0x00190B10
|
||||
// (set) Token: 0x0600791D RID: 31005 RVA: 0x00192924 File Offset: 0x00190B24
|
||||
[Token(Token = "0x170013A8")]
|
||||
public bool StartPingThread
|
||||
{
|
||||
[Token(Token = "0x600791C")]
|
||||
[Address(RVA = "0x6E4A50", Offset = "0x6E3450", VA = "0x1806E4A50")]
|
||||
get;
|
||||
[Token(Token = "0x600791D")]
|
||||
[Address(RVA = "0x6E4A60", Offset = "0x6E3460", VA = "0x1806E4A60")]
|
||||
set;
|
||||
}
|
||||
|
||||
// Token: 0x170013A9 RID: 5033
|
||||
// (get) Token: 0x0600791E RID: 31006 RVA: 0x00192938 File Offset: 0x00190B38
|
||||
// (set) Token: 0x0600791F RID: 31007 RVA: 0x0019294C File Offset: 0x00190B4C
|
||||
[Token(Token = "0x170013A9")]
|
||||
public int PingFrequency
|
||||
{
|
||||
[Token(Token = "0x600791E")]
|
||||
[Address(RVA = "0x55D550", Offset = "0x55BF50", VA = "0x18055D550")]
|
||||
get;
|
||||
[Token(Token = "0x600791F")]
|
||||
[Address(RVA = "0x55D5D0", Offset = "0x55BFD0", VA = "0x18055D5D0")]
|
||||
set;
|
||||
}
|
||||
|
||||
// Token: 0x170013AA RID: 5034
|
||||
// (get) Token: 0x06007920 RID: 31008 RVA: 0x00192960 File Offset: 0x00190B60
|
||||
// (set) Token: 0x06007921 RID: 31009 RVA: 0x00192974 File Offset: 0x00190B74
|
||||
[Token(Token = "0x170013AA")]
|
||||
public TimeSpan CloseAfterNoMesssage
|
||||
{
|
||||
[Token(Token = "0x6007920")]
|
||||
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
|
||||
get;
|
||||
[Token(Token = "0x6007921")]
|
||||
[Address(RVA = "0x3C1280", Offset = "0x3BFC80", VA = "0x1803C1280")]
|
||||
set;
|
||||
}
|
||||
|
||||
// Token: 0x170013AB RID: 5035
|
||||
// (get) Token: 0x06007922 RID: 31010 RVA: 0x00192988 File Offset: 0x00190B88
|
||||
// (set) Token: 0x06007923 RID: 31011 RVA: 0x0019299C File Offset: 0x00190B9C
|
||||
[Token(Token = "0x170013AB")]
|
||||
public HTTPRequest InternalRequest
|
||||
{
|
||||
[Token(Token = "0x6007922")]
|
||||
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
|
||||
get;
|
||||
[Token(Token = "0x6007923")]
|
||||
[Address(RVA = "0x3C1260", Offset = "0x3BFC60", VA = "0x1803C1260")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013AC RID: 5036
|
||||
// (get) Token: 0x06007924 RID: 31012 RVA: 0x001929B0 File Offset: 0x00190BB0
|
||||
// (set) Token: 0x06007925 RID: 31013 RVA: 0x001929C4 File Offset: 0x00190BC4
|
||||
[Token(Token = "0x170013AC")]
|
||||
public IExtension[] Extensions
|
||||
{
|
||||
[Token(Token = "0x6007924")]
|
||||
[Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")]
|
||||
get;
|
||||
[Token(Token = "0x6007925")]
|
||||
[Address(RVA = "0x3C1270", Offset = "0x3BFC70", VA = "0x1803C1270")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013AD RID: 5037
|
||||
// (get) Token: 0x06007926 RID: 31014 RVA: 0x001929D8 File Offset: 0x00190BD8
|
||||
[Token(Token = "0x170013AD")]
|
||||
public int Latency
|
||||
{
|
||||
[Token(Token = "0x6007926")]
|
||||
[Address(RVA = "0x6FFE00", Offset = "0x6FE800", VA = "0x1806FFE00")]
|
||||
get
|
||||
{
|
||||
return this.webSocket.<Latency>k__BackingField;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007927 RID: 31015 RVA: 0x001929F8 File Offset: 0x00190BF8
|
||||
[Token(Token = "0x6007927")]
|
||||
[Address(RVA = "0x6FF320", Offset = "0x6FDD20", VA = "0x1806FF320")]
|
||||
public WebSocket(Uri uri)
|
||||
{
|
||||
string empty = string.Empty;
|
||||
IExtension[] array = new IExtension[1];
|
||||
int num = 0;
|
||||
PerMessageCompression perMessageCompression;
|
||||
perMessageCompression.FieldGetter(num, empty, empty);
|
||||
perMessageCompression.<Level>k__BackingField = (CompressionLevel)((ulong)6L);
|
||||
perMessageCompression.<ClientNoContextTakeover>k__BackingField = false;
|
||||
perMessageCompression.<ClientMaxWindowBits>k__BackingField = (int)((ulong)15L);
|
||||
perMessageCompression.<ServerMaxWindowBits>k__BackingField = (int)((ulong)15L);
|
||||
perMessageCompression.<MinimumDataLegthToCompress>k__BackingField = (int)((ulong)256L);
|
||||
array[0] = perMessageCompression;
|
||||
this.Extensions = array;
|
||||
}
|
||||
|
||||
// Token: 0x06007928 RID: 31016 RVA: 0x00192A68 File Offset: 0x00190C68
|
||||
[Token(Token = "0x6007928")]
|
||||
[Address(RVA = "0x6FF4D0", Offset = "0x6FDED0", VA = "0x1806FF4D0")]
|
||||
public WebSocket(Uri uri, string origin, string protocol, params IExtension[] extensions)
|
||||
{
|
||||
int num = 0;
|
||||
base.FieldGetter(num, origin, protocol);
|
||||
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] = ":";
|
||||
int num2;
|
||||
if (num2 != 0)
|
||||
{
|
||||
}
|
||||
array[4] = num2;
|
||||
string requestPathAndQueryURL = uri.GetRequestPathAndQueryURL();
|
||||
if (requestPathAndQueryURL != 0)
|
||||
{
|
||||
}
|
||||
array[5] = requestPathAndQueryURL;
|
||||
Uri uri2 = new Uri(string.Concat(array));
|
||||
this.PingFrequency = (int)((ulong)1000L);
|
||||
TimeSpan timeSpan;
|
||||
this.CloseAfterNoMesssage = timeSpan;
|
||||
OnRequestFinishedDelegate onRequestFinishedDelegate = new OnRequestFinishedDelegate(this.OnInternalRequestCallback);
|
||||
HTTPRequest httprequest = new HTTPRequest(uri2, onRequestFinishedDelegate);
|
||||
this.InternalRequest = httprequest;
|
||||
OnRequestFinishedDelegate onRequestFinishedDelegate2 = new OnRequestFinishedDelegate(this.OnInternalRequestUpgraded);
|
||||
httprequest.OnUpgraded = onRequestFinishedDelegate2;
|
||||
if (!HTTPProtocolFactory.IsSecureProtocol(uri2) && uri2.Port != 80 && HTTPProtocolFactory.IsSecureProtocol(uri2) && uri2.Port != 443)
|
||||
{
|
||||
HTTPRequest httprequest2 = this.<InternalRequest>k__BackingField;
|
||||
string host2 = uri2.Host;
|
||||
int port2 = uri2.Port;
|
||||
string text2 = host2 + ":" + port2;
|
||||
}
|
||||
HTTPRequest httprequest3 = this.<InternalRequest>k__BackingField;
|
||||
string host3 = uri2.Host;
|
||||
httprequest3.SetHeader("Host", host3);
|
||||
this.<InternalRequest>k__BackingField.SetHeader("Upgrade", "websocket");
|
||||
this.<InternalRequest>k__BackingField.SetHeader("Connection", "Upgrade");
|
||||
HTTPRequest httprequest4 = this.<InternalRequest>k__BackingField;
|
||||
object[] array2 = new object[4];
|
||||
array2[0] = this;
|
||||
HTTPRequest httprequest5 = this.<InternalRequest>k__BackingField;
|
||||
if (httprequest5 != 0)
|
||||
{
|
||||
}
|
||||
array2[1] = httprequest5;
|
||||
array2[2] = uri2;
|
||||
object obj = new object();
|
||||
if (obj != 0)
|
||||
{
|
||||
}
|
||||
array2[3] = obj;
|
||||
string secKey = this.GetSecKey(array2);
|
||||
httprequest4.SetHeader("Sec-WebSocket-Key", secKey);
|
||||
if (secKey == 0)
|
||||
{
|
||||
this.<InternalRequest>k__BackingField.SetHeader("Origin", origin);
|
||||
}
|
||||
this.<InternalRequest>k__BackingField.SetHeader("Sec-WebSocket-Version", "13");
|
||||
if (secKey == 0)
|
||||
{
|
||||
this.<InternalRequest>k__BackingField.SetHeader("Sec-WebSocket-Protocol", protocol);
|
||||
}
|
||||
this.<InternalRequest>k__BackingField.SetHeader("Cache-Control", "no-cache");
|
||||
this.<InternalRequest>k__BackingField.SetHeader("Pragma", "no-cache");
|
||||
HTTPRequest httprequest6 = this.<InternalRequest>k__BackingField;
|
||||
this.Extensions = 0;
|
||||
httprequest6.DisableCache = true;
|
||||
this.<InternalRequest>k__BackingField.<DisableRetry>k__BackingField = true;
|
||||
this.<InternalRequest>k__BackingField.<TryToMinimizeTCPLatency>k__BackingField = true;
|
||||
Proxy <Proxy>k__BackingField = HTTPManager.<Proxy>k__BackingField;
|
||||
if (<Proxy>k__BackingField != 0 && <Proxy>k__BackingField != 0)
|
||||
{
|
||||
HTTPProxy httpproxy;
|
||||
this.<InternalRequest>k__BackingField.<Proxy>k__BackingField = httpproxy;
|
||||
}
|
||||
HTTPManager.Setup();
|
||||
}
|
||||
|
||||
// Token: 0x06007929 RID: 31017 RVA: 0x00192D5C File Offset: 0x00190F5C
|
||||
[Token(Token = "0x6007929")]
|
||||
[Address(RVA = "0x6FE6A0", Offset = "0x6FD0A0", VA = "0x1806FE6A0")]
|
||||
private void OnInternalRequestCallback(HTTPRequest req, HTTPResponse resp)
|
||||
{
|
||||
int num = 0;
|
||||
HTTPRequestStates httprequestStates = req.<State>k__BackingField;
|
||||
if (req != 0)
|
||||
{
|
||||
if (req != 0 && req != 0 && req != 0 && httprequestStates != HTTPRequestStates.Queued)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (req.<Exception>k__BackingField != 0)
|
||||
{
|
||||
Exception innerException = req.<Exception>k__BackingField.InnerException;
|
||||
string text2;
|
||||
string text = "Request Finished with Error! " + text2;
|
||||
}
|
||||
string empty = string.Empty;
|
||||
string text3 = "Request Finished with Error! " + empty;
|
||||
}
|
||||
if (!resp.IsSuccess)
|
||||
{
|
||||
int <StatusCode>k__BackingField = resp.<StatusCode>k__BackingField;
|
||||
if (<StatusCode>k__BackingField != 101)
|
||||
{
|
||||
string <Message>k__BackingField = resp.<Message>k__BackingField;
|
||||
string dataAsText = resp.DataAsText;
|
||||
string text4 = string.Format("Request Finished Successfully, but the server sent an error. Status Code: {0}-{1} Message: {2}", <StatusCode>k__BackingField, <Message>k__BackingField, dataAsText);
|
||||
if ((int)this.<State>k__BackingField == num && text4 != 0)
|
||||
{
|
||||
OnWebSocketClosedDelegate onClosed = this.OnClosed;
|
||||
if (onClosed == 0)
|
||||
{
|
||||
goto IL_112;
|
||||
}
|
||||
uint num2;
|
||||
onClosed(this, (ushort)num2, "Closed while opening");
|
||||
}
|
||||
OnWebSocketErrorDelegate onError = this.OnError;
|
||||
if (onError != 0)
|
||||
{
|
||||
Exception <Exception>k__BackingField = req.<Exception>k__BackingField;
|
||||
onError(this, <Exception>k__BackingField);
|
||||
}
|
||||
OnWebSocketErrorDescriptionDelegate onErrorDesc = this.OnErrorDesc;
|
||||
if (onErrorDesc != 0)
|
||||
{
|
||||
onErrorDesc(this, text4);
|
||||
}
|
||||
if (this.OnError == num && this.OnErrorDesc == num)
|
||||
{
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
}
|
||||
IL_112:
|
||||
if ((req.isKeepAlive ? 1 : 0) != num || resp == 0 || resp != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
ILogger logger2 = HTTPManager.Logger;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600792A RID: 31018 RVA: 0x00192E9C File Offset: 0x0019109C
|
||||
[Token(Token = "0x600792A")]
|
||||
[Address(RVA = "0x6FE9D0", Offset = "0x6FD3D0", VA = "0x1806FE9D0")]
|
||||
private void OnInternalRequestUpgraded(HTTPRequest req, HTTPResponse resp)
|
||||
{
|
||||
int num = 0;
|
||||
if (resp != 0)
|
||||
{
|
||||
}
|
||||
this.webSocket = num;
|
||||
WebSocketResponse webSocketResponse6;
|
||||
WaitCallback waitCallback;
|
||||
if (num != 0)
|
||||
{
|
||||
IExtension[] array = this.<Extensions>k__BackingField;
|
||||
if (array != 0)
|
||||
{
|
||||
int length = array.Length;
|
||||
if (num < length)
|
||||
{
|
||||
if (array[num] != 0 && array == 0)
|
||||
{
|
||||
this.<Extensions>k__BackingField[0] = num;
|
||||
}
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
IExtension[] array2 = this.<Extensions>k__BackingField;
|
||||
int num2 = 0;
|
||||
array2[0] = num2;
|
||||
num++;
|
||||
}
|
||||
}
|
||||
this.<State>k__BackingField = (WebSocketStates)((ulong)1L);
|
||||
if (this.OnOpen != (ulong)0L)
|
||||
{
|
||||
this.OnOpen(this);
|
||||
ILogger logger2 = HTTPManager.Logger;
|
||||
}
|
||||
WebSocketResponse webSocketResponse = this.webSocket;
|
||||
Action<WebSocketResponse, string> action = delegate(WebSocketResponse ws, string msg)
|
||||
{
|
||||
OnWebSocketMessageDelegate onMessage = this.OnMessage;
|
||||
if (onMessage != 0)
|
||||
{
|
||||
onMessage(this, msg);
|
||||
return;
|
||||
}
|
||||
};
|
||||
webSocketResponse.OnText = action;
|
||||
WebSocketResponse webSocketResponse2 = this.webSocket;
|
||||
Action<WebSocketResponse, byte[]> action2 = delegate(WebSocketResponse ws, byte[] bin)
|
||||
{
|
||||
OnWebSocketBinaryDelegate onBinary = this.OnBinary;
|
||||
if (onBinary != 0)
|
||||
{
|
||||
onBinary(this, bin);
|
||||
return;
|
||||
}
|
||||
};
|
||||
webSocketResponse2.OnBinary = action2;
|
||||
WebSocketResponse webSocketResponse3 = this.webSocket;
|
||||
Action<WebSocketResponse, ushort, string> action3 = delegate(WebSocketResponse ws, ushort code, string msg)
|
||||
{
|
||||
OnWebSocketClosedDelegate onClosed = this.OnClosed;
|
||||
this.<State>k__BackingField = (WebSocketStates)((ulong)3L);
|
||||
if (onClosed != 0)
|
||||
{
|
||||
onClosed(this, code, msg);
|
||||
return;
|
||||
}
|
||||
};
|
||||
webSocketResponse3.OnClosed = action3;
|
||||
if (this.OnIncompleteFrame != (ulong)0L)
|
||||
{
|
||||
WebSocketResponse webSocketResponse4 = this.webSocket;
|
||||
Action<WebSocketResponse, WebSocketFrameReader> action4 = delegate(WebSocketResponse ws, WebSocketFrameReader frame)
|
||||
{
|
||||
if (this.OnIncompleteFrame != 0)
|
||||
{
|
||||
byte[] <Data>k__BackingField = frame.<Data>k__BackingField;
|
||||
}
|
||||
};
|
||||
webSocketResponse4.OnIncompleteFrame = action4;
|
||||
}
|
||||
if (this.<StartPingThread>k__BackingField)
|
||||
{
|
||||
WebSocketResponse webSocketResponse5 = this.webSocket;
|
||||
int num3 = Math.Max(this.<PingFrequency>k__BackingField, 100);
|
||||
webSocketResponse5.StartPinging(num3);
|
||||
}
|
||||
webSocketResponse6 = this.webSocket;
|
||||
waitCallback = new WaitCallback(webSocketResponse6.ReceiveThreadFunc);
|
||||
bool flag = ThreadPool.QueueUserWorkItem(waitCallback);
|
||||
return;
|
||||
}
|
||||
if (waitCallback.original_method_info != 0)
|
||||
{
|
||||
}
|
||||
if (waitCallback.data != 0 && webSocketResponse6.Stream != 0)
|
||||
{
|
||||
bool canRead = webSocketResponse6.Stream.CanRead;
|
||||
DelegateData data = waitCallback.data;
|
||||
}
|
||||
waitCallback.method_ptr = (IntPtr)((ulong)3L);
|
||||
}
|
||||
|
||||
// Token: 0x0600792B RID: 31019 RVA: 0x00193054 File Offset: 0x00191254
|
||||
[Token(Token = "0x600792B")]
|
||||
[Address(RVA = "0x6FEF40", Offset = "0x6FD940", VA = "0x1806FEF40")]
|
||||
public void Open()
|
||||
{
|
||||
if (!this.requestSent)
|
||||
{
|
||||
if (this.<Extensions>k__BackingField != (ulong)0L)
|
||||
{
|
||||
int num = 0;
|
||||
IExtension[] array = this.<Extensions>k__BackingField;
|
||||
int length = array.Length;
|
||||
if (num < length)
|
||||
{
|
||||
if (array[num] != 0)
|
||||
{
|
||||
}
|
||||
num++;
|
||||
}
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
}
|
||||
HTTPRequest httprequest = this.<InternalRequest>k__BackingField.Send();
|
||||
this.requestSent = true;
|
||||
this.<State>k__BackingField = (WebSocketStates)((ulong)0L);
|
||||
return;
|
||||
}
|
||||
InvalidOperationException ex = new InvalidOperationException("Open already called! You can't reuse this WebSocket instance!");
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
|
||||
// Token: 0x0600792C RID: 31020 RVA: 0x001930E4 File Offset: 0x001912E4
|
||||
[Token(Token = "0x600792C")]
|
||||
[Address(RVA = "0x6FF0D0", Offset = "0x6FDAD0", VA = "0x1806FF0D0")]
|
||||
public void Send(string message)
|
||||
{
|
||||
WebSocketResponse webSocketResponse = this.webSocket;
|
||||
if (webSocketResponse != 0 && !webSocketResponse.closed)
|
||||
{
|
||||
this.webSocket.Send(message);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600792D RID: 31021 RVA: 0x00193118 File Offset: 0x00191318
|
||||
[Token(Token = "0x600792D")]
|
||||
[Address(RVA = "0x6FF210", Offset = "0x6FDC10", VA = "0x1806FF210")]
|
||||
public void Send(byte[] buffer)
|
||||
{
|
||||
WebSocketResponse webSocketResponse = this.webSocket;
|
||||
if (webSocketResponse != 0 && !webSocketResponse.closed)
|
||||
{
|
||||
this.webSocket.Send(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600792E RID: 31022 RVA: 0x0019314C File Offset: 0x0019134C
|
||||
[Token(Token = "0x600792E")]
|
||||
[Address(RVA = "0x6FF130", Offset = "0x6FDB30", VA = "0x1806FF130")]
|
||||
public void Send(byte[] buffer, ulong offset, ulong count)
|
||||
{
|
||||
WebSocketResponse webSocketResponse = this.webSocket;
|
||||
if (webSocketResponse != 0 && !webSocketResponse.closed)
|
||||
{
|
||||
this.webSocket.Send(buffer, offset, count);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600792F RID: 31023 RVA: 0x00193184 File Offset: 0x00191384
|
||||
[Token(Token = "0x600792F")]
|
||||
[Address(RVA = "0x6FF1B0", Offset = "0x6FDBB0", VA = "0x1806FF1B0")]
|
||||
public void Send(WebSocketFrame frame)
|
||||
{
|
||||
WebSocketResponse webSocketResponse = this.webSocket;
|
||||
if (webSocketResponse != 0 && !webSocketResponse.closed)
|
||||
{
|
||||
this.webSocket.Send(frame);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007930 RID: 31024 RVA: 0x001931B8 File Offset: 0x001913B8
|
||||
[Token(Token = "0x6007930")]
|
||||
[Address(RVA = "0x6FE1C0", Offset = "0x6FCBC0", VA = "0x1806FE1C0")]
|
||||
public void Close()
|
||||
{
|
||||
WebSocketStates webSocketStates = this.<State>k__BackingField;
|
||||
this.<State>k__BackingField = (WebSocketStates)((ulong)2L);
|
||||
WebSocketResponse webSocketResponse = this.webSocket;
|
||||
}
|
||||
|
||||
// Token: 0x06007931 RID: 31025 RVA: 0x00193200 File Offset: 0x00191400
|
||||
[Token(Token = "0x6007931")]
|
||||
[Address(RVA = "0x6FE280", Offset = "0x6FCC80", VA = "0x1806FE280")]
|
||||
public void Close(ushort code, string message)
|
||||
{
|
||||
WebSocketResponse webSocketResponse = this.webSocket;
|
||||
if (webSocketResponse != 0 && !webSocketResponse.closed)
|
||||
{
|
||||
this.webSocket.Close(code, message);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007932 RID: 31026 RVA: 0x00193234 File Offset: 0x00191434
|
||||
[Token(Token = "0x6007932")]
|
||||
[Address(RVA = "0x6FE2F0", Offset = "0x6FCCF0", VA = "0x1806FE2F0")]
|
||||
public static byte[] EncodeCloseData(ushort code, string message)
|
||||
{
|
||||
int num;
|
||||
byte[] array;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
object obj = Encoding.UTF8.Clone();
|
||||
byte[] bytes = BitConverter.GetBytes(code);
|
||||
int length = bytes.Length;
|
||||
int num2 = 0;
|
||||
Array.Reverse(bytes, num2, length);
|
||||
BufferPoolMemoryStream bufferPoolMemoryStream;
|
||||
int num3 = bufferPoolMemoryStream.ReadByte();
|
||||
Encoding utf = Encoding.UTF8;
|
||||
int num4 = bufferPoolMemoryStream.ReadByte();
|
||||
array = bufferPoolMemoryStream.ToArray();
|
||||
if (bufferPoolMemoryStream != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06007933 RID: 31027 RVA: 0x001932C4 File Offset: 0x001914C4
|
||||
[Token(Token = "0x6007933")]
|
||||
[Address(RVA = "0x6FE520", Offset = "0x6FCF20", VA = "0x1806FE520")]
|
||||
private string GetSecKey(object[] from)
|
||||
{
|
||||
byte[] array = new byte[16];
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
int length = from.Length;
|
||||
if (num < length)
|
||||
{
|
||||
from[num3].Finalize();
|
||||
int num4 = 0;
|
||||
byte[] array2;
|
||||
int length2 = array2.Length;
|
||||
if (num4 < length2)
|
||||
{
|
||||
int length3 = array.Length;
|
||||
if (num2 < length3)
|
||||
{
|
||||
num2++;
|
||||
num4++;
|
||||
}
|
||||
}
|
||||
num3++;
|
||||
}
|
||||
return Convert.ToBase64String(array);
|
||||
}
|
||||
|
||||
// Token: 0x04005762 RID: 22370
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4005762")]
|
||||
public OnWebSocketOpenDelegate OnOpen;
|
||||
|
||||
// Token: 0x04005763 RID: 22371
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4005763")]
|
||||
public OnWebSocketMessageDelegate OnMessage;
|
||||
|
||||
// Token: 0x04005764 RID: 22372
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4005764")]
|
||||
public OnWebSocketBinaryDelegate OnBinary;
|
||||
|
||||
// Token: 0x04005765 RID: 22373
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4005765")]
|
||||
public OnWebSocketClosedDelegate OnClosed;
|
||||
|
||||
// Token: 0x04005766 RID: 22374
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4005766")]
|
||||
public OnWebSocketErrorDelegate OnError;
|
||||
|
||||
// Token: 0x04005767 RID: 22375
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x4005767")]
|
||||
public OnWebSocketErrorDescriptionDelegate OnErrorDesc;
|
||||
|
||||
// Token: 0x04005768 RID: 22376
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x4005768")]
|
||||
public OnWebSocketIncompleteFrameDelegate OnIncompleteFrame;
|
||||
|
||||
// Token: 0x04005769 RID: 22377
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x4005769")]
|
||||
private bool requestSent;
|
||||
|
||||
// Token: 0x0400576A RID: 22378
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x400576A")]
|
||||
private WebSocketResponse webSocket;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,910 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using BestHTTP.Extensions;
|
||||
using BestHTTP.Logger;
|
||||
using BestHTTP.WebSocket.Frames;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket
|
||||
{
|
||||
// Token: 0x020012EB RID: 4843
|
||||
[Token(Token = "0x20012EB")]
|
||||
[StructLayout(3)]
|
||||
public sealed class WebSocketResponse : HTTPResponse, IHeartbeat, IProtocol
|
||||
{
|
||||
// Token: 0x170013AE RID: 5038
|
||||
// (get) Token: 0x06007938 RID: 31032 RVA: 0x001933C8 File Offset: 0x001915C8
|
||||
// (set) Token: 0x06007939 RID: 31033 RVA: 0x001933DC File Offset: 0x001915DC
|
||||
[Token(Token = "0x170013AE")]
|
||||
public WebSocket WebSocket
|
||||
{
|
||||
[Token(Token = "0x6007938")]
|
||||
[Address(RVA = "0x408B30", Offset = "0x407530", VA = "0x180408B30")]
|
||||
get;
|
||||
[Token(Token = "0x6007939")]
|
||||
[Address(RVA = "0x5D5C80", Offset = "0x5D4680", VA = "0x1805D5C80")]
|
||||
internal set;
|
||||
}
|
||||
|
||||
// Token: 0x170013AF RID: 5039
|
||||
// (get) Token: 0x0600793A RID: 31034 RVA: 0x001933F0 File Offset: 0x001915F0
|
||||
[Token(Token = "0x170013AF")]
|
||||
public bool IsClosed
|
||||
{
|
||||
[Token(Token = "0x600793A")]
|
||||
[Address(RVA = "0x6FC7B0", Offset = "0x6FB1B0", VA = "0x1806FC7B0", Slot = "7")]
|
||||
get
|
||||
{
|
||||
return this.closed;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170013B0 RID: 5040
|
||||
// (get) Token: 0x0600793B RID: 31035 RVA: 0x00193404 File Offset: 0x00191604
|
||||
// (set) Token: 0x0600793C RID: 31036 RVA: 0x00193418 File Offset: 0x00191618
|
||||
[Token(Token = "0x170013B0")]
|
||||
public TimeSpan PingFrequnecy
|
||||
{
|
||||
[Token(Token = "0x600793B")]
|
||||
[Address(RVA = "0x3CBEE0", Offset = "0x3CA8E0", VA = "0x1803CBEE0")]
|
||||
get;
|
||||
[Token(Token = "0x600793C")]
|
||||
[Address(RVA = "0x6FC800", Offset = "0x6FB200", VA = "0x1806FC800")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013B1 RID: 5041
|
||||
// (get) Token: 0x0600793D RID: 31037 RVA: 0x0019342C File Offset: 0x0019162C
|
||||
// (set) Token: 0x0600793E RID: 31038 RVA: 0x00193440 File Offset: 0x00191640
|
||||
[Token(Token = "0x170013B1")]
|
||||
public ushort MaxFragmentSize
|
||||
{
|
||||
[Token(Token = "0x600793D")]
|
||||
[Address(RVA = "0x6FC7D0", Offset = "0x6FB1D0", VA = "0x1806FC7D0")]
|
||||
get;
|
||||
[Token(Token = "0x600793E")]
|
||||
[Address(RVA = "0x6FC7F0", Offset = "0x6FB1F0", VA = "0x1806FC7F0")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x170013B2 RID: 5042
|
||||
// (get) Token: 0x0600793F RID: 31039 RVA: 0x00193454 File Offset: 0x00191654
|
||||
[Token(Token = "0x170013B2")]
|
||||
public int BufferedAmount
|
||||
{
|
||||
[Token(Token = "0x600793F")]
|
||||
[Address(RVA = "0x3D30C0", Offset = "0x3D1AC0", VA = "0x1803D30C0")]
|
||||
get
|
||||
{
|
||||
return this._bufferedAmount;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170013B3 RID: 5043
|
||||
// (get) Token: 0x06007940 RID: 31040 RVA: 0x00193468 File Offset: 0x00191668
|
||||
// (set) Token: 0x06007941 RID: 31041 RVA: 0x0019347C File Offset: 0x0019167C
|
||||
[Token(Token = "0x170013B3")]
|
||||
public int Latency
|
||||
{
|
||||
[Token(Token = "0x6007940")]
|
||||
[Address(RVA = "0x50B890", Offset = "0x50A290", VA = "0x18050B890")]
|
||||
get;
|
||||
[Token(Token = "0x6007941")]
|
||||
[Address(RVA = "0x6FC7E0", Offset = "0x6FB1E0", VA = "0x1806FC7E0")]
|
||||
private set;
|
||||
}
|
||||
|
||||
// Token: 0x06007942 RID: 31042 RVA: 0x00193490 File Offset: 0x00191690
|
||||
[Token(Token = "0x6007942")]
|
||||
[Address(RVA = "0x6FC570", Offset = "0x6FAF70", VA = "0x1806FC570")]
|
||||
internal WebSocketResponse(HTTPRequest request, Stream stream, bool isStreamed, bool isFromCache)
|
||||
{
|
||||
List<WebSocketFrameReader> list = new List();
|
||||
this.IncompleteFrames = list;
|
||||
List<WebSocketFrameReader> list2 = new List();
|
||||
this.CompletedFrames = list2;
|
||||
List<WebSocketFrameReader> list3 = new List();
|
||||
this.frameCache = list3;
|
||||
object obj = new object();
|
||||
this.FrameLock = obj;
|
||||
object obj2 = new object();
|
||||
this.SendLock = obj2;
|
||||
List<WebSocketFrame> list4 = new List();
|
||||
this.unsentFrames = list4;
|
||||
int num;
|
||||
AutoResetEvent autoResetEvent = new AutoResetEvent(num != 0);
|
||||
num = 0;
|
||||
this.newFrameSignal = autoResetEvent;
|
||||
DateTime minValue = DateTime.MinValue;
|
||||
this.lastPing = minValue;
|
||||
DateTime minValue2 = DateTime.MinValue;
|
||||
this.lastMessage = minValue2;
|
||||
CircularBuffer<int> circularBuffer = new CircularBuffer(WebSocketResponse.RTTBufferCapacity);
|
||||
this.rtts = circularBuffer;
|
||||
this.<IsClosedManually>k__BackingField = true;
|
||||
this.MaxFragmentSize = (ushort)((uint)32767);
|
||||
this.closed = false;
|
||||
}
|
||||
|
||||
// Token: 0x06007943 RID: 31043 RVA: 0x00193550 File Offset: 0x00191750
|
||||
[Token(Token = "0x6007943")]
|
||||
[Address(RVA = "0x6FC4C0", Offset = "0x6FAEC0", VA = "0x1806FC4C0")]
|
||||
internal void StartReceive()
|
||||
{
|
||||
bool flag = ThreadPool.QueueUserWorkItem(new WaitCallback(this.ReceiveThreadFunc));
|
||||
}
|
||||
|
||||
// Token: 0x06007944 RID: 31044 RVA: 0x00193570 File Offset: 0x00191770
|
||||
[Token(Token = "0x6007944")]
|
||||
[Address(RVA = "0x6F9DF0", Offset = "0x6F87F0", VA = "0x1806F9DF0")]
|
||||
internal void CloseStream()
|
||||
{
|
||||
ConnectionBase connectionWith = HTTPManager.GetConnectionWith(this.baseRequest);
|
||||
if (connectionWith != 0)
|
||||
{
|
||||
connectionWith.Abort((HTTPConnectionStates)((uint)9));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007945 RID: 31045 RVA: 0x00193598 File Offset: 0x00191798
|
||||
[Token(Token = "0x6007945")]
|
||||
[Address(RVA = "0x6FBFF0", Offset = "0x6FA9F0", VA = "0x1806FBFF0")]
|
||||
public void Send(string message)
|
||||
{
|
||||
int num;
|
||||
WebSocketFrame webSocketFrame;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
if (message == 0)
|
||||
{
|
||||
goto IL_A2;
|
||||
}
|
||||
object obj = Encoding.UTF8.Clone();
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(message);
|
||||
byte[] <Data>k__BackingField = webSocketFrame.<Data>k__BackingField;
|
||||
if (<Data>k__BackingField == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
ushort num2 = this.<MaxFragmentSize>k__BackingField;
|
||||
if (<Data>k__BackingField.Length <= (int)num2)
|
||||
{
|
||||
break;
|
||||
}
|
||||
WebSocketFrame[] array = webSocketFrame.Fragment(num2);
|
||||
object sendLock = this.SendLock;
|
||||
this.Send(webSocketFrame);
|
||||
if (array != 0 && num < array.Length)
|
||||
{
|
||||
WebSocketFrame webSocketFrame2 = array[num];
|
||||
this.Send(webSocketFrame2);
|
||||
num++;
|
||||
}
|
||||
Monitor.Exit(sendLock);
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
this.Send(webSocketFrame);
|
||||
return;
|
||||
IL_A2:
|
||||
ArgumentNullException ex = new ArgumentNullException("message must not be null!");
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
|
||||
// Token: 0x06007946 RID: 31046 RVA: 0x00193658 File Offset: 0x00191858
|
||||
[Token(Token = "0x6007946")]
|
||||
[Address(RVA = "0x6FB8E0", Offset = "0x6FA2E0", VA = "0x1806FB8E0")]
|
||||
public void Send(byte[] data)
|
||||
{
|
||||
int num;
|
||||
WebSocketFrame webSocketFrame;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
if (data == 0)
|
||||
{
|
||||
goto IL_9D;
|
||||
}
|
||||
int length;
|
||||
ulong num2;
|
||||
ulong num3;
|
||||
webSocketFrame = new WebSocketFrame(this.<WebSocket>k__BackingField, (WebSocketFrameTypes)((ulong)2L), data, (ulong)num, (ulong)length, num2 != 0UL, num3 != 0UL);
|
||||
length = data.Length;
|
||||
byte[] <Data>k__BackingField = webSocketFrame.<Data>k__BackingField;
|
||||
if (<Data>k__BackingField == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
ushort num4 = this.<MaxFragmentSize>k__BackingField;
|
||||
if (<Data>k__BackingField.Length <= (int)num4)
|
||||
{
|
||||
break;
|
||||
}
|
||||
WebSocketFrame[] array = webSocketFrame.Fragment(num4);
|
||||
object sendLock = this.SendLock;
|
||||
this.Send(webSocketFrame);
|
||||
if (array != 0 && num < array.Length)
|
||||
{
|
||||
WebSocketFrame webSocketFrame2 = array[num];
|
||||
this.Send(webSocketFrame2);
|
||||
num++;
|
||||
}
|
||||
Monitor.Exit(sendLock);
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
this.Send(webSocketFrame);
|
||||
return;
|
||||
IL_9D:
|
||||
ArgumentNullException ex = new ArgumentNullException("data must not be null!");
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
|
||||
// Token: 0x06007947 RID: 31047 RVA: 0x00193714 File Offset: 0x00191914
|
||||
[Token(Token = "0x6007947")]
|
||||
[Address(RVA = "0x6FBB00", Offset = "0x6FA500", VA = "0x1806FBB00")]
|
||||
public void Send(byte[] data, ulong offset, ulong count)
|
||||
{
|
||||
int num;
|
||||
WebSocketFrame webSocketFrame;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
if (data == 0)
|
||||
{
|
||||
goto IL_85;
|
||||
}
|
||||
int length = data.Length;
|
||||
byte[] <Data>k__BackingField = webSocketFrame.<Data>k__BackingField;
|
||||
if (<Data>k__BackingField == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
ushort num2 = this.<MaxFragmentSize>k__BackingField;
|
||||
if (<Data>k__BackingField.Length <= (int)num2)
|
||||
{
|
||||
break;
|
||||
}
|
||||
WebSocketFrame[] array = webSocketFrame.Fragment(num2);
|
||||
object sendLock = this.SendLock;
|
||||
this.Send(webSocketFrame);
|
||||
if (array != 0 && num < array.Length)
|
||||
{
|
||||
WebSocketFrame webSocketFrame2 = array[num];
|
||||
this.Send(webSocketFrame2);
|
||||
num++;
|
||||
}
|
||||
Monitor.Exit(sendLock);
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
this.Send(webSocketFrame);
|
||||
return;
|
||||
IL_85:
|
||||
ArgumentNullException ex = new ArgumentNullException("data must not be null!");
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
|
||||
// Token: 0x06007948 RID: 31048 RVA: 0x001937B8 File Offset: 0x001919B8
|
||||
[Token(Token = "0x6007948")]
|
||||
[Address(RVA = "0x6FBD70", Offset = "0x6FA770", VA = "0x1806FBD70")]
|
||||
public void Send(WebSocketFrame frame)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
if (frame == 0)
|
||||
{
|
||||
goto IL_80;
|
||||
}
|
||||
if (this.closed || this.closeSent)
|
||||
{
|
||||
return;
|
||||
}
|
||||
object sendLock = this.SendLock;
|
||||
this.unsentFrames.Add(frame);
|
||||
if (!this.sendThreadCreated)
|
||||
{
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
bool flag = ThreadPool.QueueUserWorkItem(new WaitCallback(this.SendThreadFunc));
|
||||
this.sendThreadCreated = true;
|
||||
}
|
||||
Monitor.Exit(sendLock);
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
if (frame.<Data>k__BackingField != (ulong)0L)
|
||||
{
|
||||
}
|
||||
bool flag2 = this.newFrameSignal.Set();
|
||||
return;
|
||||
IL_80:
|
||||
ArgumentNullException ex = new ArgumentNullException("frame is null!");
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007949 RID: 31049 RVA: 0x0019385C File Offset: 0x00191A5C
|
||||
[Token(Token = "0x6007949")]
|
||||
[Address(RVA = "0x6FA230", Offset = "0x6F8C30", VA = "0x1806FA230")]
|
||||
public void Insert(WebSocketFrame frame)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
if (frame == 0)
|
||||
{
|
||||
goto IL_8A;
|
||||
}
|
||||
if (this.closed || this.closeSent)
|
||||
{
|
||||
return;
|
||||
}
|
||||
object sendLock = this.SendLock;
|
||||
List<WebSocketFrame> list = this.unsentFrames;
|
||||
int num2 = 0;
|
||||
list.Insert(num2, frame);
|
||||
if (!this.sendThreadCreated)
|
||||
{
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
bool flag = ThreadPool.QueueUserWorkItem(new WaitCallback(this.SendThreadFunc));
|
||||
this.sendThreadCreated = true;
|
||||
}
|
||||
Monitor.Exit(sendLock);
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
if (frame.<Data>k__BackingField != (ulong)0L)
|
||||
{
|
||||
}
|
||||
bool flag2 = this.newFrameSignal.Set();
|
||||
return;
|
||||
IL_8A:
|
||||
ArgumentNullException ex = new ArgumentNullException("frame is null!");
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600794A RID: 31050 RVA: 0x0019390C File Offset: 0x00191B0C
|
||||
[Token(Token = "0x600794A")]
|
||||
[Address(RVA = "0x6FAF30", Offset = "0x6F9930", VA = "0x1806FAF30")]
|
||||
public void SendNow(WebSocketFrame frame)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600794A)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.WebSocket.WebSocketResponse::SendNow(BestHTTP.WebSocket.Frames.WebSocketFrame)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_40:
|
||||
stloc:ArgumentNullException(var_4_4A, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("frame is null!")))
|
||||
}
|
||||
|
||||
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: 0x0600794B RID: 31051 RVA: 0x00193964 File Offset: 0x00191B64
|
||||
[Token(Token = "0x600794B")]
|
||||
[Address(RVA = "0x6FA1F0", Offset = "0x6F8BF0", VA = "0x1806FA1F0")]
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600794C RID: 31052 RVA: 0x00193974 File Offset: 0x00191B74
|
||||
[Token(Token = "0x600794C")]
|
||||
[Address(RVA = "0x6FA020", Offset = "0x6F8A20", VA = "0x1806FA020")]
|
||||
public void Close(ushort code, string msg)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
if (this.closed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
object sendLock = this.SendLock;
|
||||
this.unsentFrames.Clear();
|
||||
int num2 = 0;
|
||||
Monitor.Exit(sendLock);
|
||||
if (num2 != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
WebSocket webSocket = this.<WebSocket>k__BackingField;
|
||||
byte[] array = WebSocket.EncodeCloseData(code, msg);
|
||||
ulong num3;
|
||||
int num4;
|
||||
ulong num5;
|
||||
ulong num6;
|
||||
WebSocketFrame webSocketFrame = new WebSocketFrame(webSocket, (WebSocketFrameTypes)((ulong)8L), array, num3, (ulong)num4, num5 != 0UL, num6 != 0UL);
|
||||
if (array != 0)
|
||||
{
|
||||
}
|
||||
num4 = 0;
|
||||
this.Send(webSocketFrame);
|
||||
}
|
||||
|
||||
// Token: 0x0600794D RID: 31053 RVA: 0x001939F4 File Offset: 0x00191BF4
|
||||
[Token(Token = "0x600794D")]
|
||||
[Address(RVA = "0x6FC2F0", Offset = "0x6FACF0", VA = "0x1806FC2F0")]
|
||||
public void StartPinging(int frequency)
|
||||
{
|
||||
Delegate @delegate;
|
||||
int num;
|
||||
do
|
||||
{
|
||||
TimeSpan timeSpan;
|
||||
this.<PingFrequnecy>k__BackingField = timeSpan;
|
||||
DateTime utcNow = DateTime.UtcNow;
|
||||
this.lastMessage = utcNow;
|
||||
this.SendPing();
|
||||
HTTPManager.Heartbeats.Subscribe(this);
|
||||
Action<bool> onApplicationForegroundStateChanged = HTTPUpdateDelegator.OnApplicationForegroundStateChanged;
|
||||
Action<bool> action = new Action(this.OnApplicationForegroundStateChanged);
|
||||
@delegate = Delegate.Combine(onApplicationForegroundStateChanged, action);
|
||||
num = 0;
|
||||
}
|
||||
while (@delegate != 0 && @delegate == 0);
|
||||
HTTPUpdateDelegator.OnApplicationForegroundStateChanged = num;
|
||||
}
|
||||
|
||||
// Token: 0x0600794E RID: 31054 RVA: 0x00193A6C File Offset: 0x00191C6C
|
||||
[Token(Token = "0x600794E")]
|
||||
[Address(RVA = "0x6FB2E0", Offset = "0x6F9CE0", VA = "0x1806FB2E0")]
|
||||
private void SendThreadFunc(object param)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
List<WebSocketFrame> list = new List();
|
||||
if (!this.closed && !this.closeSent)
|
||||
{
|
||||
AutoResetEvent autoResetEvent = this.newFrameSignal;
|
||||
object sendLock = this.SendLock;
|
||||
int size = this.unsentFrames._size;
|
||||
List<WebSocketFrame> list2 = this.unsentFrames;
|
||||
list.Clear();
|
||||
Monitor.Exit(sendLock);
|
||||
if ((ulong)((uint)(-1)) != (ulong)(-1L))
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
int size2 = list._size;
|
||||
list.RemoveAt(size2);
|
||||
if (this.closeSent)
|
||||
{
|
||||
goto IL_93;
|
||||
}
|
||||
int num2 = this.Stream.ReadByte();
|
||||
if ((ulong)((uint)(-1)) != (ulong)(-1L))
|
||||
{
|
||||
this.closeSent = true;
|
||||
goto IL_93;
|
||||
}
|
||||
IL_9B:
|
||||
if (num == 0)
|
||||
{
|
||||
HTTPRequest baseRequest = this.baseRequest;
|
||||
baseRequest.<State>k__BackingField = (HTTPRequestStates)((ulong)5L);
|
||||
this.baseRequest.<Exception>k__BackingField = baseRequest;
|
||||
this.baseRequest.<State>k__BackingField = (HTTPRequestStates)((ulong)4L);
|
||||
this.closed = true;
|
||||
goto IL_D6;
|
||||
}
|
||||
goto IL_125;
|
||||
IL_93:
|
||||
Stream stream = this.Stream;
|
||||
goto IL_9B;
|
||||
}
|
||||
goto IL_11F;
|
||||
}
|
||||
IL_D6:
|
||||
this.sendThreadCreated = false;
|
||||
AutoResetEvent autoResetEvent2 = this.newFrameSignal;
|
||||
this.newFrameSignal = (ulong)0L;
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
if ((ulong)((uint)(-1)) != (ulong)(-1L))
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
return;
|
||||
IL_11F:
|
||||
throw new NullReferenceException();
|
||||
IL_125:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600794F RID: 31055 RVA: 0x00193BD4 File Offset: 0x00191DD4
|
||||
[Token(Token = "0x600794F")]
|
||||
[Address(RVA = "0x6FA520", Offset = "0x6F8F20", VA = "0x1806FA520")]
|
||||
private void ReceiveThreadFunc(object param)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int num = 0;
|
||||
ReadOnlyBufferedStream readOnlyBufferedStream = new ReadOnlyBufferedStream(this.Stream);
|
||||
int num2 = 0;
|
||||
uint num3;
|
||||
if (!this.closed)
|
||||
{
|
||||
DateTime utcNow = DateTime.UtcNow;
|
||||
this.lastMessage = utcNow;
|
||||
if (utcNow <= (ulong)10L)
|
||||
{
|
||||
if (this.OnIncompleteFrame != (ulong)0L)
|
||||
{
|
||||
object frameLock = this.FrameLock;
|
||||
List<WebSocketFrameReader> completedFrames = this.CompletedFrames;
|
||||
num3 += (uint)1;
|
||||
Monitor.Exit(frameLock);
|
||||
if (num3 != (uint)(-1))
|
||||
{
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
goto IL_23E;
|
||||
}
|
||||
}
|
||||
this.IncompleteFrames.Clear();
|
||||
object frameLock2 = this.FrameLock;
|
||||
List<WebSocketFrameReader> completedFrames2 = this.CompletedFrames;
|
||||
num3 += (uint)1;
|
||||
Monitor.Exit(frameLock2);
|
||||
if (num3 != (uint)(-1))
|
||||
{
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
goto IL_24A;
|
||||
}
|
||||
int num4;
|
||||
if (!this.closeSent)
|
||||
{
|
||||
num4 = 0;
|
||||
WebSocketFrame webSocketFrame;
|
||||
this.Send(webSocketFrame);
|
||||
}
|
||||
this.closed = true;
|
||||
if (!this.closeSent && !this.closed)
|
||||
{
|
||||
if (num4 != 0)
|
||||
{
|
||||
}
|
||||
WebSocketFrame webSocketFrame2;
|
||||
this.Send(webSocketFrame2);
|
||||
long num5;
|
||||
num5 -= num5;
|
||||
TimeSpan timeSpan = TimeSpan.FromTicks(num5);
|
||||
CircularBuffer<int> circularBuffer = this.rtts;
|
||||
int num6 = 0;
|
||||
circularBuffer.Add(num6);
|
||||
int num7 = this.CalculateLatency();
|
||||
this.<Latency>k__BackingField = num7;
|
||||
}
|
||||
}
|
||||
int num8;
|
||||
if (this.OnIncompleteFrame != (ulong)0L)
|
||||
{
|
||||
object frameLock3 = this.FrameLock;
|
||||
List<WebSocketFrameReader> completedFrames3 = this.CompletedFrames;
|
||||
num3 += (uint)1;
|
||||
num8 = 0;
|
||||
Monitor.Exit(frameLock3);
|
||||
if (num3 != (uint)(-1))
|
||||
{
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
goto IL_268;
|
||||
}
|
||||
}
|
||||
this.IncompleteFrames.Add(num8);
|
||||
uint num9;
|
||||
this.Close((ushort)num9, "Protocol Error: masked frame received from server!");
|
||||
this.IncompleteFrames.Clear();
|
||||
this.baseRequest.<State>k__BackingField = (HTTPRequestStates)((ulong)5L);
|
||||
this.closed = true;
|
||||
HTTPRequest baseRequest;
|
||||
if (!this.newFrameSignal.Set())
|
||||
{
|
||||
baseRequest = this.baseRequest;
|
||||
baseRequest.<State>k__BackingField = (HTTPRequestStates)((ulong)5L);
|
||||
}
|
||||
this.baseRequest.<Exception>k__BackingField = baseRequest;
|
||||
this.baseRequest.<State>k__BackingField = (HTTPRequestStates)((ulong)4L);
|
||||
this.closed = true;
|
||||
AutoResetEvent autoResetEvent = this.newFrameSignal;
|
||||
}
|
||||
num3 += (uint)1;
|
||||
if (num2 != 0)
|
||||
{
|
||||
}
|
||||
if (num3 != (uint)(-1))
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
HTTPManager.Heartbeats.Unsubscribe(this);
|
||||
Action<bool> onApplicationForegroundStateChanged = HTTPUpdateDelegator.OnApplicationForegroundStateChanged;
|
||||
Action<bool> action = new Action(this.OnApplicationForegroundStateChanged);
|
||||
Delegate @delegate = Delegate.Remove(onApplicationForegroundStateChanged, action);
|
||||
if (@delegate == 0 || @delegate != 0)
|
||||
{
|
||||
HTTPUpdateDelegator.OnApplicationForegroundStateChanged = @delegate;
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
if (num3 != (uint)(-1))
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
IL_23E:
|
||||
throw new NullReferenceException();
|
||||
IL_24A:
|
||||
throw new NullReferenceException();
|
||||
IL_268:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007950 RID: 31056 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007950")]
|
||||
[Address(RVA = "0x6F97F0", Offset = "0x6F81F0", VA = "0x1806F97F0", Slot = "8")]
|
||||
void IProtocol.HandleEvents()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06007951 RID: 31057 RVA: 0x00193E74 File Offset: 0x00192074
|
||||
[Token(Token = "0x6007951")]
|
||||
[Address(RVA = "0x6F9440", Offset = "0x6F7E40", VA = "0x1806F9440", Slot = "6")]
|
||||
void IHeartbeat.OnHeartbeatUpdate(TimeSpan dif)
|
||||
{
|
||||
DateTime utcNow = DateTime.UtcNow;
|
||||
DateTime dateTime = this.lastPing;
|
||||
TimeSpan timeSpan = utcNow - dateTime;
|
||||
TimeSpan timeSpan2 = this.<PingFrequnecy>k__BackingField;
|
||||
if (timeSpan >= timeSpan2)
|
||||
{
|
||||
this.SendPing();
|
||||
}
|
||||
DateTime dateTime2 = this.lastMessage;
|
||||
TimeSpan timeSpan3 = this.<PingFrequnecy>k__BackingField;
|
||||
DateTime dateTime3 = dateTime2 + timeSpan3;
|
||||
TimeSpan timeSpan4 = utcNow - dateTime3;
|
||||
TimeSpan <CloseAfterNoMesssage>k__BackingField = this.<WebSocket>k__BackingField.<CloseAfterNoMesssage>k__BackingField;
|
||||
if (timeSpan4 > <CloseAfterNoMesssage>k__BackingField)
|
||||
{
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
object[] array = new object[4];
|
||||
DateTime dateTime4 = this.lastMessage;
|
||||
if (array != 0)
|
||||
{
|
||||
}
|
||||
array[0] = array;
|
||||
TimeSpan timeSpan5 = this.<PingFrequnecy>k__BackingField;
|
||||
if (timeSpan5 != 0)
|
||||
{
|
||||
}
|
||||
array[1] = timeSpan5;
|
||||
TimeSpan <CloseAfterNoMesssage>k__BackingField2 = this.<WebSocket>k__BackingField.<CloseAfterNoMesssage>k__BackingField;
|
||||
if (<CloseAfterNoMesssage>k__BackingField2 != 0)
|
||||
{
|
||||
}
|
||||
array[2] = <CloseAfterNoMesssage>k__BackingField2;
|
||||
if (<CloseAfterNoMesssage>k__BackingField2 != 0)
|
||||
{
|
||||
}
|
||||
array[3] = <CloseAfterNoMesssage>k__BackingField2;
|
||||
string text = string.Format("No message received in the given time! Closing WebSocket. LastMessage: {0}, PingFrequency: {1}, Close After: {2}, Now: {3}", array);
|
||||
this.CloseWithError("No message received in the given time!");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007952 RID: 31058 RVA: 0x00193F7C File Offset: 0x0019217C
|
||||
[Token(Token = "0x6007952")]
|
||||
[Address(RVA = "0x6FA4B0", Offset = "0x6F8EB0", VA = "0x1806FA4B0")]
|
||||
private void OnApplicationForegroundStateChanged(bool isPaused)
|
||||
{
|
||||
if (!isPaused)
|
||||
{
|
||||
DateTime utcNow = DateTime.UtcNow;
|
||||
this.lastMessage = utcNow;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007953 RID: 31059 RVA: 0x00193F9C File Offset: 0x0019219C
|
||||
[Token(Token = "0x6007953")]
|
||||
[Address(RVA = "0x6FB100", Offset = "0x6F9B00", VA = "0x1806FB100")]
|
||||
private void SendPing()
|
||||
{
|
||||
DateTime utcNow = DateTime.UtcNow;
|
||||
this.lastPing = utcNow;
|
||||
DateTime utcNow2 = DateTime.UtcNow;
|
||||
byte[] array;
|
||||
ulong num;
|
||||
int num2;
|
||||
ulong num3;
|
||||
ulong num4;
|
||||
WebSocketFrame webSocketFrame = new WebSocketFrame(this.<WebSocket>k__BackingField, (WebSocketFrameTypes)((ulong)9L), array, num, (ulong)num2, num3 != 0UL, num4 != 0UL);
|
||||
if (array != 0)
|
||||
{
|
||||
}
|
||||
num2 = 0;
|
||||
this.Insert(webSocketFrame);
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
}
|
||||
|
||||
// Token: 0x06007954 RID: 31060 RVA: 0x00194004 File Offset: 0x00192204
|
||||
[Token(Token = "0x6007954")]
|
||||
[Address(RVA = "0x6F9E70", Offset = "0x6F8870", VA = "0x1806F9E70")]
|
||||
private void CloseWithError(string message)
|
||||
{
|
||||
Delegate @delegate;
|
||||
int num;
|
||||
do
|
||||
{
|
||||
HTTPRequest baseRequest = this.baseRequest;
|
||||
Exception ex = new Exception(message);
|
||||
baseRequest.<Exception>k__BackingField = ex;
|
||||
this.baseRequest.<State>k__BackingField = (HTTPRequestStates)((ulong)4L);
|
||||
this.closed = true;
|
||||
HTTPManager.Heartbeats.Unsubscribe(this);
|
||||
Action<bool> onApplicationForegroundStateChanged = HTTPUpdateDelegator.OnApplicationForegroundStateChanged;
|
||||
Action<bool> action = new Action(this.OnApplicationForegroundStateChanged);
|
||||
@delegate = Delegate.Remove(onApplicationForegroundStateChanged, action);
|
||||
num = 0;
|
||||
}
|
||||
while (@delegate != 0 && @delegate == 0);
|
||||
HTTPUpdateDelegator.OnApplicationForegroundStateChanged = num;
|
||||
bool flag = this.newFrameSignal.Set();
|
||||
this.CloseStream();
|
||||
}
|
||||
|
||||
// Token: 0x06007955 RID: 31061 RVA: 0x00194094 File Offset: 0x00192294
|
||||
[Token(Token = "0x6007955")]
|
||||
[Address(RVA = "0x6F9D30", Offset = "0x6F8730", VA = "0x1806F9D30")]
|
||||
private int CalculateLatency()
|
||||
{
|
||||
CircularBuffer<int> circularBuffer = this.rtts;
|
||||
int num = 0;
|
||||
int num2 = circularBuffer[num];
|
||||
num += num2;
|
||||
num++;
|
||||
CircularBuffer<int> circularBuffer2 = this.rtts;
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0400576B RID: 22379
|
||||
[Token(Token = "0x400576B")]
|
||||
public static int RTTBufferCapacity;
|
||||
|
||||
// Token: 0x0400576D RID: 22381
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xE0")]
|
||||
[Token(Token = "0x400576D")]
|
||||
public Action<WebSocketResponse, string> OnText;
|
||||
|
||||
// Token: 0x0400576E RID: 22382
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xE8")]
|
||||
[Token(Token = "0x400576E")]
|
||||
public Action<WebSocketResponse, byte[]> OnBinary;
|
||||
|
||||
// Token: 0x0400576F RID: 22383
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xF0")]
|
||||
[Token(Token = "0x400576F")]
|
||||
public Action<WebSocketResponse, WebSocketFrameReader> OnIncompleteFrame;
|
||||
|
||||
// Token: 0x04005770 RID: 22384
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xF8")]
|
||||
[Token(Token = "0x4005770")]
|
||||
public Action<WebSocketResponse, ushort, string> OnClosed;
|
||||
|
||||
// Token: 0x04005773 RID: 22387
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10C")]
|
||||
[Token(Token = "0x4005773")]
|
||||
private int _bufferedAmount;
|
||||
|
||||
// Token: 0x04005775 RID: 22389
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x118")]
|
||||
[Token(Token = "0x4005775")]
|
||||
private List<WebSocketFrameReader> IncompleteFrames;
|
||||
|
||||
// Token: 0x04005776 RID: 22390
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x120")]
|
||||
[Token(Token = "0x4005776")]
|
||||
private List<WebSocketFrameReader> CompletedFrames;
|
||||
|
||||
// Token: 0x04005777 RID: 22391
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x128")]
|
||||
[Token(Token = "0x4005777")]
|
||||
private List<WebSocketFrameReader> frameCache;
|
||||
|
||||
// Token: 0x04005778 RID: 22392
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x130")]
|
||||
[Token(Token = "0x4005778")]
|
||||
private WebSocketFrameReader CloseFrame;
|
||||
|
||||
// Token: 0x04005779 RID: 22393
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x150")]
|
||||
[Token(Token = "0x4005779")]
|
||||
private object FrameLock;
|
||||
|
||||
// Token: 0x0400577A RID: 22394
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x158")]
|
||||
[Token(Token = "0x400577A")]
|
||||
private object SendLock;
|
||||
|
||||
// Token: 0x0400577B RID: 22395
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x160")]
|
||||
[Token(Token = "0x400577B")]
|
||||
private List<WebSocketFrame> unsentFrames;
|
||||
|
||||
// Token: 0x0400577C RID: 22396
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x168")]
|
||||
[Token(Token = "0x400577C")]
|
||||
private AutoResetEvent newFrameSignal;
|
||||
|
||||
// Token: 0x0400577D RID: 22397
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x170")]
|
||||
[Token(Token = "0x400577D")]
|
||||
private bool sendThreadCreated;
|
||||
|
||||
// Token: 0x0400577E RID: 22398
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x171")]
|
||||
[Token(Token = "0x400577E")]
|
||||
private bool closeSent;
|
||||
|
||||
// Token: 0x0400577F RID: 22399
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x172")]
|
||||
[Token(Token = "0x400577F")]
|
||||
private bool closed;
|
||||
|
||||
// Token: 0x04005780 RID: 22400
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x178")]
|
||||
[Token(Token = "0x4005780")]
|
||||
private DateTime lastPing;
|
||||
|
||||
// Token: 0x04005781 RID: 22401
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x180")]
|
||||
[Token(Token = "0x4005781")]
|
||||
private DateTime lastMessage;
|
||||
|
||||
// Token: 0x04005782 RID: 22402
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x188")]
|
||||
[Token(Token = "0x4005782")]
|
||||
private CircularBuffer<int> rtts;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket
|
||||
{
|
||||
// Token: 0x020012E2 RID: 4834
|
||||
[Token(Token = "0x20012E2")]
|
||||
[StructLayout(3, Size = 1)]
|
||||
public enum WebSocketStates : byte
|
||||
{
|
||||
// Token: 0x04005757 RID: 22359
|
||||
[Token(Token = "0x4005757")]
|
||||
Connecting,
|
||||
// Token: 0x04005758 RID: 22360
|
||||
[Token(Token = "0x4005758")]
|
||||
Open,
|
||||
// Token: 0x04005759 RID: 22361
|
||||
[Token(Token = "0x4005759")]
|
||||
Closing,
|
||||
// Token: 0x0400575A RID: 22362
|
||||
[Token(Token = "0x400575A")]
|
||||
Closed,
|
||||
// Token: 0x0400575B RID: 22363
|
||||
[Token(Token = "0x400575B")]
|
||||
Unknown
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.WebSocket
|
||||
{
|
||||
// Token: 0x020012EC RID: 4844
|
||||
[Token(Token = "0x20012EC")]
|
||||
[StructLayout(3, Size = 2)]
|
||||
public enum WebSocketStausCodes : ushort
|
||||
{
|
||||
// Token: 0x04005784 RID: 22404
|
||||
[Token(Token = "0x4005784")]
|
||||
NormalClosure = 1000,
|
||||
// Token: 0x04005785 RID: 22405
|
||||
[Token(Token = "0x4005785")]
|
||||
GoingAway,
|
||||
// Token: 0x04005786 RID: 22406
|
||||
[Token(Token = "0x4005786")]
|
||||
ProtocolError,
|
||||
// Token: 0x04005787 RID: 22407
|
||||
[Token(Token = "0x4005787")]
|
||||
WrongDataType,
|
||||
// Token: 0x04005788 RID: 22408
|
||||
[Token(Token = "0x4005788")]
|
||||
Reserved,
|
||||
// Token: 0x04005789 RID: 22409
|
||||
[Token(Token = "0x4005789")]
|
||||
NoStatusCode,
|
||||
// Token: 0x0400578A RID: 22410
|
||||
[Token(Token = "0x400578A")]
|
||||
ClosedAbnormally,
|
||||
// Token: 0x0400578B RID: 22411
|
||||
[Token(Token = "0x400578B")]
|
||||
DataError,
|
||||
// Token: 0x0400578C RID: 22412
|
||||
[Token(Token = "0x400578C")]
|
||||
PolicyError,
|
||||
// Token: 0x0400578D RID: 22413
|
||||
[Token(Token = "0x400578D")]
|
||||
TooBigMessage,
|
||||
// Token: 0x0400578E RID: 22414
|
||||
[Token(Token = "0x400578E")]
|
||||
ExtensionExpected,
|
||||
// Token: 0x0400578F RID: 22415
|
||||
[Token(Token = "0x400578F")]
|
||||
WrongRequest,
|
||||
// Token: 0x04005790 RID: 22416
|
||||
[Token(Token = "0x4005790")]
|
||||
TLSHandshakeError = 1015
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user