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
TcpListener.cs
Go to the documentation of this file.
1using System;
2
3namespace System.Net.Sockets
4{
5 // Token: 0x02000306 RID: 774
6 public class TcpListener
7 {
8 // Token: 0x06001420 RID: 5152 RVA: 0x0003D8B4 File Offset: 0x0003BAB4
9 public TcpListener(IPAddress localaddr, int port)
10 {
11 bool on = Logging.On;
12 if (localaddr != null)
13 {
14 bool flag = ValidationHelper.ValidateTcpPort(port);
15 bool on2 = Logging.On;
16 return;
17 }
18 }
19
20 // Token: 0x06001421 RID: 5153 RVA: 0x0003D8E4 File Offset: 0x0003BAE4
21 public static TcpListener Create(int port)
22 {
23 /*
24An exception occurred when decompiling this method (06001421)
25
26ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Net.Sockets.TcpListener System.Net.Sockets.TcpListener::Create(System.Int32)
27
28 ---> System.Exception: Basic block has to end with unconditional control flow.
29{
30 IL_0015:
31 stloc:bool(var_4_1C, callgetter:bool(Logging::get_On))
32}
33
34 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
35 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
36 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
37 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
38 --- End of inner exception stack trace ---
39 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
40 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
41*/;
42 }
43
44 // Token: 0x1700048F RID: 1167
45 // (get) Token: 0x06001422 RID: 5154 RVA: 0x0003D910 File Offset: 0x0003BB10
47 {
48 get
49 {
50 return this.m_ServerSocket;
51 }
52 }
53
54 // Token: 0x06001423 RID: 5155 RVA: 0x0003D924 File Offset: 0x0003BB24
55 public void Start()
56 {
57 }
58
59 // Token: 0x06001424 RID: 5156 RVA: 0x0003D934 File Offset: 0x0003BB34
60 public void Start(int backlog)
61 {
62 bool on = Logging.On;
64 if (serverSocket != null)
65 {
66 if (!this.m_Active)
67 {
69 serverSocket.Bind(serverSocketEP);
70 this.m_ServerSocket.Listen(backlog);
71 int num = 1;
72 this.m_Active = num != 0;
73 }
74 bool on2 = Logging.On;
75 return;
76 }
77 string @string = SR.GetString("The socket handle is not valid.");
78 throw new OutOfMemoryException();
79 }
80
81 // Token: 0x06001425 RID: 5157 RVA: 0x0003D9A0 File Offset: 0x0003BBA0
82 public void Stop()
83 {
84 bool on = Logging.On;
86 if (serverSocket != null)
87 {
89 }
91 if (this.m_ExclusiveAddressUse)
92 {
93 }
94 bool on2 = Logging.On;
95 }
96
97 // Token: 0x06001426 RID: 5158 RVA: 0x0003D9E0 File Offset: 0x0003BBE0
99 {
100 /*
101An exception occurred when decompiling this method (06001426)
102
103ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Net.Sockets.TcpClient System.Net.Sockets.TcpListener::AcceptTcpClient()
104
105 ---> System.Exception: Basic block has to end with unconditional control flow.
106{
107 IL_0025:
108 stloc:string(var_5_2F, call:string(SR::GetString, ldstr:string("Not listening. You must call the Start() method before calling this method.")))
109}
110
111 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
112 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
113 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
114 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
115 --- End of inner exception stack trace ---
116 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
117 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
118*/;
119 }
120
121 // Token: 0x040010D5 RID: 4309
123
124 // Token: 0x040010D6 RID: 4310
126
127 // Token: 0x040010D7 RID: 4311
128 private bool m_Active;
129
130 // Token: 0x040010D8 RID: 4312
132 }
133}
class f__AnonymousType0<< Count > j__TPar
static string GetString(string name, params object[] args)
Definition SR.cs:9
Definition SR.cs:7
static bool On
Definition Logging.cs:12
void Bind(EndPoint localEP)
Definition Socket.cs:909
void Listen(int backlog)
Definition Socket.cs:945
static TcpListener Create(int port)
TcpListener(IPAddress localaddr, int port)
Definition TcpListener.cs:9
static bool ValidateTcpPort(int port)