terraria-cpp2il-methodrecon
v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
LegacyNetBufferPool.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Collections.Generic
;
3
using
Cpp2IlInjected
;
4
5
namespace
Terraria.Net
6
{
7
// Token: 0x020006A0 RID: 1696
8
public
class
LegacyNetBufferPool
9
{
10
// Token: 0x06003889 RID: 14473 RVA: 0x000021DB File Offset: 0x000003DB
11
public
static
byte
[]
RequestBuffer
(
int
size)
12
{
13
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
14
}
15
16
// Token: 0x0600388A RID: 14474 RVA: 0x00225EB8 File Offset: 0x002240B8
17
public
static
byte
[]
RequestBuffer
(
byte
[] data,
int
offset
,
int
size)
18
{
19
if
(!
true
)
20
{
21
}
22
return
LegacyNetBufferPool
.
RequestBuffer
(
offset
);
23
}
24
25
// Token: 0x0600388B RID: 14475 RVA: 0x00225ED0 File Offset: 0x002240D0
26
public
static
void
ReturnBuffer
(
byte
[] buffer)
27
{
28
if
(!
true
)
29
{
30
}
31
if
(!
true
)
32
{
33
}
34
}
35
36
// Token: 0x0600388C RID: 14476 RVA: 0x00225F14 File Offset: 0x00224114
37
public
static
void
DisplayBufferSizes
()
38
{
39
int
num = 1;
40
if
(num == 0)
41
{
42
}
43
if
(num == 0)
44
{
45
}
46
string
text2;
47
string
text3
;
48
string
text
=
"Small Buffers: "
+ text2 +
" queued of "
+
text3
;
49
int
num2
= 255;
50
int
num3
= 255;
51
int
num4
= 255;
52
Main
.
NewText
(
text
, (
byte
)
num2
, (
byte
)
num3
, (
byte
)
num4
);
53
string
text5
;
54
string
text6
;
55
string
text4
=
"Medium Buffers: "
+
text5
+
" queued of "
+
text6
;
56
int
num5
= 255;
57
int
num6
= 255;
58
int
num7
= 255;
59
Main
.
NewText
(
text4
, (
byte
)
num5
, (
byte
)
num6
, (
byte
)
num7
);
60
string
text8
;
61
string
text9
;
62
string
text7
=
"Large Buffers: "
+
text8
+
" queued of "
+
text9
;
63
int
num8
= 255;
64
int
num9
= 255;
65
int
num10
= 255;
66
Main
.
NewText
(
text7
, (
byte
)
num8
, (
byte
)
num9
, (
byte
)
num10
);
67
string
text11
;
68
string
text10
=
"Custom Buffers: 0 queued of "
+
text11
;
69
int
num11
= 255;
70
int
num12
= 255;
71
int
num13
= 255;
72
Main
.
NewText
(
text10
, (
byte
)
num11
, (
byte
)
num12
, (
byte
)
num13
);
73
long
num14
= 0
L
;
74
if
(
"Custom Buffers: 0 queued of "
!=
null
)
75
{
76
}
77
if
(
num14
== 0
L
)
78
{
79
return
;
80
}
81
throw
new
OutOfMemoryException
();
82
}
83
84
// Token: 0x0600388D RID: 14477 RVA: 0x00226038 File Offset: 0x00224238
85
public
static
void
PrintBufferSizes
()
86
{
87
int
num = 1;
88
if
(num == 0)
89
{
90
}
91
if
(num == 0)
92
{
93
}
94
string
text
;
95
string
text2;
96
Console
.
WriteLine
(
"Small Buffers: "
+
text
+
" queued of "
+ text2);
97
string
text3
;
98
string
text4
;
99
Console
.
WriteLine
(
"Medium Buffers: "
+
text3
+
" queued of "
+
text4
);
100
string
text5
;
101
string
text6
;
102
Console
.
WriteLine
(
"Large Buffers: "
+
text5
+
" queued of "
+
text6
);
103
string
text7
;
104
Console
.
WriteLine
(
"Custom Buffers: 0 queued of "
+
text7
);
105
Console
.
WriteLine
(
""
);
106
long
num2
= 0
L
;
107
if
(
""
!=
null
)
108
{
109
}
110
if
(
num2
== 0
L
)
111
{
112
return
;
113
}
114
throw
new
OutOfMemoryException
();
115
}
116
117
// Token: 0x0600388E RID: 14478 RVA: 0x002260EC File Offset: 0x002242EC
118
public
LegacyNetBufferPool
()
119
{
120
}
121
122
// Token: 0x0600388F RID: 14479 RVA: 0x00226100 File Offset: 0x00224300
123
// Note: this type is marked as 'beforefieldinit'.
124
static
LegacyNetBufferPool
()
125
{
126
}
127
128
// Token: 0x0400793D RID: 31037
129
private
const
int
SMALL_BUFFER_SIZE
= 256;
130
131
// Token: 0x0400793E RID: 31038
132
private
const
int
MEDIUM_BUFFER_SIZE
= 1024;
133
134
// Token: 0x0400793F RID: 31039
135
private
const
int
LARGE_BUFFER_SIZE
= 16384;
136
137
// Token: 0x04007940 RID: 31040
138
private
static
object
bufferLock
;
139
140
// Token: 0x04007941 RID: 31041
141
private
static
Queue<byte[]>
_smallBufferQueue
;
142
143
// Token: 0x04007942 RID: 31042
144
private
static
Queue<byte[]>
_mediumBufferQueue
;
145
146
// Token: 0x04007943 RID: 31043
147
private
static
Queue<byte[]>
_largeBufferQueue
;
148
149
// Token: 0x04007944 RID: 31044
150
private
static
int
_smallBufferCount
;
151
152
// Token: 0x04007945 RID: 31045
153
private
static
int
_mediumBufferCount
;
154
155
// Token: 0x04007946 RID: 31046
156
private
static
int
_largeBufferCount
;
157
158
// Token: 0x04007947 RID: 31047
159
private
static
int
_customBufferCount
;
160
}
161
}
j__TPar
class f__AnonymousType0<< Count > j__TPar
Definition
--f__AnonymousType0.cs:8
Cpp2IlInjected.AnalysisFailedException
Definition
AnalysisFailedException.cs:7
System.Collections.Generic.Queue
Definition
Queue.cs:14
System.Console.WriteLine
static void WriteLine(object value)
Definition
Console.cs:134
System.Console
Definition
Console.cs:9
System.OutOfMemoryException
Definition
OutOfMemoryException.cs:9
Terraria.Main.NewText
static void NewText(string newText, byte R=255, byte G=255, byte B=255)
Definition
Main.cs:17778
Terraria.Main
Definition
Main.cs:67
Terraria.Net.LegacyNetBufferPool._largeBufferCount
static int _largeBufferCount
Definition
LegacyNetBufferPool.cs:156
Terraria.Net.LegacyNetBufferPool.LegacyNetBufferPool
static LegacyNetBufferPool()
Definition
LegacyNetBufferPool.cs:124
Terraria.Net.LegacyNetBufferPool.SMALL_BUFFER_SIZE
const int SMALL_BUFFER_SIZE
Definition
LegacyNetBufferPool.cs:129
Terraria.Net.LegacyNetBufferPool._mediumBufferQueue
static Queue< byte[]> _mediumBufferQueue
Definition
LegacyNetBufferPool.cs:144
Terraria.Net.LegacyNetBufferPool.RequestBuffer
static byte[] RequestBuffer(int size)
Definition
LegacyNetBufferPool.cs:11
Terraria.Net.LegacyNetBufferPool._customBufferCount
static int _customBufferCount
Definition
LegacyNetBufferPool.cs:159
Terraria.Net.LegacyNetBufferPool.ReturnBuffer
static void ReturnBuffer(byte[] buffer)
Definition
LegacyNetBufferPool.cs:26
Terraria.Net.LegacyNetBufferPool.DisplayBufferSizes
static void DisplayBufferSizes()
Definition
LegacyNetBufferPool.cs:37
Terraria.Net.LegacyNetBufferPool.LegacyNetBufferPool
LegacyNetBufferPool()
Definition
LegacyNetBufferPool.cs:118
Terraria.Net.LegacyNetBufferPool._smallBufferQueue
static Queue< byte[]> _smallBufferQueue
Definition
LegacyNetBufferPool.cs:141
Terraria.Net.LegacyNetBufferPool._smallBufferCount
static int _smallBufferCount
Definition
LegacyNetBufferPool.cs:150
Terraria.Net.LegacyNetBufferPool._largeBufferQueue
static Queue< byte[]> _largeBufferQueue
Definition
LegacyNetBufferPool.cs:147
Terraria.Net.LegacyNetBufferPool.MEDIUM_BUFFER_SIZE
const int MEDIUM_BUFFER_SIZE
Definition
LegacyNetBufferPool.cs:132
Terraria.Net.LegacyNetBufferPool.LARGE_BUFFER_SIZE
const int LARGE_BUFFER_SIZE
Definition
LegacyNetBufferPool.cs:135
Terraria.Net.LegacyNetBufferPool.bufferLock
static object bufferLock
Definition
LegacyNetBufferPool.cs:138
Terraria.Net.LegacyNetBufferPool.PrintBufferSizes
static void PrintBufferSizes()
Definition
LegacyNetBufferPool.cs:85
Terraria.Net.LegacyNetBufferPool.RequestBuffer
static byte[] RequestBuffer(byte[] data, int offset, int size)
Definition
LegacyNetBufferPool.cs:17
Terraria.Net.LegacyNetBufferPool._mediumBufferCount
static int _mediumBufferCount
Definition
LegacyNetBufferPool.cs:153
Terraria.Net.LegacyNetBufferPool
Definition
LegacyNetBufferPool.cs:9
Cpp2IlInjected
Definition
AnalysisFailedException.cs:4
System.Collections.Generic
Definition
ArrayBuilder.cs:5
System.ExceptionArgument.text
@ text
System.ExceptionArgument.offset
@ offset
System.ConsoleKey.L
@ L
System
Definition
__ComObject.cs:4
Terraria.Net
Definition
AddressType.cs:4
source
Terraria
Net
LegacyNetBufferPool.cs
Generated by
1.10.0