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
TcpClient.cs
Go to the documentation of this file.
1using System;
3
4namespace System.Net.Sockets
5{
6 // Token: 0x02000305 RID: 773
7 public class TcpClient : IDisposable
8 {
9 // Token: 0x0600140C RID: 5132 RVA: 0x0003D49C File Offset: 0x0003B69C
10 public TcpClient()
11 {
12 bool on = Logging.On;
13 bool on2 = Logging.On;
14 }
15
16 // Token: 0x0600140D RID: 5133 RVA: 0x0003D4BC File Offset: 0x0003B6BC
18 {
19 this.m_Family = AddressFamily.InterNetwork;
20 base..ctor();
21 bool on = Logging.On;
23 this.initialize();
24 bool on2 = Logging.On;
25 }
26
27 // Token: 0x0600140E RID: 5134 RVA: 0x0003D4FC File Offset: 0x0003B6FC
29 {
30 this.m_Family = AddressFamily.InterNetwork;
31 base..ctor();
32 bool on = Logging.On;
34 this.m_Active = true;
35 bool on2 = Logging.On;
36 }
37
38 // Token: 0x1700048B RID: 1163
39 // (get) Token: 0x0600140F RID: 5135 RVA: 0x0003D534 File Offset: 0x0003B734
40 // (set) Token: 0x06001410 RID: 5136 RVA: 0x0003D548 File Offset: 0x0003B748
42 {
43 get
44 {
45 return this.m_ClientSocket;
46 }
47 set
48 {
50 }
51 }
52
53 // Token: 0x1700048C RID: 1164
54 // (get) Token: 0x06001411 RID: 5137 RVA: 0x0003D55C File Offset: 0x0003B75C
55 public bool Connected
56 {
57 get
58 {
59 return this.m_ClientSocket.is_connected;
60 }
61 }
62
63 // Token: 0x06001412 RID: 5138 RVA: 0x0003D574 File Offset: 0x0003B774
64 public void Connect(string hostname, int port)
65 {
66 bool on = Logging.On;
67 if (!this.m_CleanedUp)
68 {
69 if (hostname != null)
70 {
71 bool flag = ValidationHelper.ValidateTcpPort(port);
72 if (this.m_Active)
73 {
74 return;
75 }
78 if (clientSocket == null)
79 {
80 if (clientSocket == null)
81 {
82 }
84 if (clientSocket == null)
85 {
86 }
88 }
89 ushort[] numbers = hostAddresses._numbers;
90 if (numbers != null)
91 {
92 return;
93 }
94 AddressFamily addressFamily;
95 if (addressFamily != AddressFamily.Unspecified)
96 {
97 if (addressFamily != AddressFamily.Unspecified)
98 {
99 return;
100 }
101 }
102 else if (addressFamily == AddressFamily.Unspecified || addressFamily != AddressFamily.Unspecified)
103 {
104 }
105 return;
106 }
107 }
108 else
109 {
111 Type type = hostAddresses.GetType();
112 }
113 }
114
115 // Token: 0x06001413 RID: 5139 RVA: 0x0003D64C File Offset: 0x0003B84C
116 public void Connect(IPAddress address, int port)
117 {
118 bool on = Logging.On;
119 if (!this.m_CleanedUp)
120 {
121 if (address != null)
122 {
123 bool flag = ValidationHelper.ValidateTcpPort(port);
124 bool on2 = Logging.On;
125 return;
126 }
127 }
128 else
129 {
130 Type type = base.GetType();
131 }
132 }
133
134 // Token: 0x06001414 RID: 5140 RVA: 0x0003D688 File Offset: 0x0003B888
136 {
137 /*
138An exception occurred when decompiling this method (06001414)
139
140ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.Net.Sockets.TcpClient::Connect(System.Net.IPEndPoint)
141
142 ---> System.Exception: Basic block has to end with unconditional control flow.
143{
144 IL_002F:
145 stloc:Type(var_4_35, call:Type(object::GetType, ldloc:TcpClient[exp:object](this)))
146}
147
148 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
149 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
150 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
151 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
152 --- End of inner exception stack trace ---
153 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
154 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 1683
155*/;
156 }
157
158 // Token: 0x06001415 RID: 5141 RVA: 0x0003D6CC File Offset: 0x0003B8CC
159 public IAsyncResult BeginConnect(string host, int port, AsyncCallback requestCallback, object state)
160 {
161 /*
162An exception occurred when decompiling this method (06001415)
163
164ICSharpCode.Decompiler.DecompilerException: Error decompiling System.IAsyncResult System.Net.Sockets.TcpClient::BeginConnect(System.String,System.Int32,System.AsyncCallback,System.Object)
165
166 ---> System.Exception: Basic block has to end with unconditional control flow.
167{
168 Block_0:
169 stloc:bool(var_1_07, callgetter:bool(Logging::get_On))
170 stloc:IAsyncResult(var_2_18, call:IAsyncResult(Socket::BeginConnect, ldfld:Socket(TcpClient::m_ClientSocket, ldloc:TcpClient(this)), ldloc:string(host), ldloc:int32(port), ldloc:AsyncCallback(requestCallback), ldloc:object(state)))
171 stloc:bool(var_3_1E, callgetter:bool(Logging::get_On))
172}
173
174 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
175 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
176 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
177 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
178 --- End of inner exception stack trace ---
179 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
180 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 1683
181*/;
182 }
183
184 // Token: 0x06001416 RID: 5142 RVA: 0x0003D6F8 File Offset: 0x0003B8F8
185 public void EndConnect(IAsyncResult asyncResult)
186 {
187 bool on = Logging.On;
188 this.m_ClientSocket.EndConnect(asyncResult);
189 this.m_Active = true;
190 bool on2 = Logging.On;
191 }
192
193 // Token: 0x06001417 RID: 5143 RVA: 0x0003D728 File Offset: 0x0003B928
194 public Task ConnectAsync(string host, int port)
195 {
196 if (!true)
197 {
198 }
199 if (!true)
200 {
201 }
202 Task task;
203 return task;
204 }
205
206 // Token: 0x06001418 RID: 5144 RVA: 0x0003D73C File Offset: 0x0003B93C
208 {
209 /*
210An exception occurred when decompiling this method (06001418)
211
212ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Net.Sockets.NetworkStream System.Net.Sockets.TcpClient::GetStream()
213
214 ---> System.Exception: Basic block has to end with unconditional control flow.
215{
216 IL_003C:
217 stloc:string(var_5_46, call:string(SR::GetString, ldstr:string("The operation is not allowed on non-connected sockets.")))
218}
219
220 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
221 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
222 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
223 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
224 --- End of inner exception stack trace ---
225 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
226 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 1683
227*/;
228 }
229
230 // Token: 0x06001419 RID: 5145 RVA: 0x0003D790 File Offset: 0x0003B990
231 public void Close()
232 {
233 bool on = Logging.On;
234 }
235
236 // Token: 0x0600141A RID: 5146 RVA: 0x0003D7B0 File Offset: 0x0003B9B0
237 protected virtual void Dispose(bool disposing)
238 {
239 bool on = Logging.On;
240 if (!this.m_CleanedUp)
241 {
242 if (this.m_DataStream != null)
243 {
244 return;
245 }
247 if (clientSocket != null)
248 {
250 return;
251 }
252 GC.SuppressFinalize(this);
253 int num = 1;
254 this.m_CleanedUp = num != 0;
255 }
256 bool on2 = Logging.On;
257 }
258
259 // Token: 0x0600141B RID: 5147 RVA: 0x0003D824 File Offset: 0x0003BA24
260 public void Dispose()
261 {
262 }
263
264 // Token: 0x0600141C RID: 5148 RVA: 0x0003D834 File Offset: 0x0003BA34
265 protected override void Finalize()
266 {
267 base.Finalize();
268 }
269
270 // Token: 0x1700048D RID: 1165
271 // (set) Token: 0x0600141D RID: 5149 RVA: 0x0003D868 File Offset: 0x0003BA68
272 public int SendTimeout
273 {
274 set
275 {
277 }
278 }
279
280 // Token: 0x1700048E RID: 1166
281 // (set) Token: 0x0600141E RID: 5150 RVA: 0x0003D88C File Offset: 0x0003BA8C
282 public bool NoDelay
283 {
284 set
285 {
287 }
288 }
289
290 // Token: 0x0600141F RID: 5151 RVA: 0x0003D8A0 File Offset: 0x0003BAA0
291 private void initialize()
292 {
294 }
295
296 // Token: 0x040010D0 RID: 4304
298
299 // Token: 0x040010D1 RID: 4305
300 private bool m_Active;
301
302 // Token: 0x040010D2 RID: 4306
304
305 // Token: 0x040010D3 RID: 4307
307
308 // Token: 0x040010D4 RID: 4308
309 private bool m_CleanedUp;
310 }
311}
class f__AnonymousType0<< Count > j__TPar
static void SuppressFinalize(object obj)
Definition GC.cs:116
static IPAddress[] GetHostAddresses(string hostNameOrAddress)
Definition Dns.cs:215
static bool On
Definition Logging.cs:12
static bool OSSupportsIPv6
Definition Socket.cs:183
void SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, int optionValue, bool silent)
Definition Socket.cs:500
static bool OSSupportsIPv4
Definition Socket.cs:155
void EndConnect(IAsyncResult asyncResult)
Definition Socket.cs:1088
IAsyncResult BeginConnect(string host, int port, AsyncCallback requestCallback, object state)
Definition TcpClient.cs:159
virtual void Dispose(bool disposing)
Definition TcpClient.cs:237
NetworkStream GetStream()
Definition TcpClient.cs:207
void Connect(IPEndPoint remoteEP)
Definition TcpClient.cs:135
void EndConnect(IAsyncResult asyncResult)
Definition TcpClient.cs:185
TcpClient(Socket acceptedSocket)
Definition TcpClient.cs:28
Task ConnectAsync(string host, int port)
Definition TcpClient.cs:194
void Connect(IPAddress address, int port)
Definition TcpClient.cs:116
void Connect(string hostname, int port)
Definition TcpClient.cs:64
TcpClient(AddressFamily family)
Definition TcpClient.cs:17
static bool ValidateTcpPort(int port)
new Type GetType()
Definition Type.cs:287