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
Common.cs
Go to the documentation of this file.
1using System;
3using System.IO;
7
8namespace Telepathy
9{
10 // Token: 0x02000312 RID: 786
11 public abstract class Common
12 {
13 // Token: 0x170001CE RID: 462
14 // (get) Token: 0x06001264 RID: 4708 RVA: 0x000598D8 File Offset: 0x00057AD8
16 {
17 get
18 {
19 return this.receiveQueue.Count;
20 }
21 }
22
23 // Token: 0x06001265 RID: 4709 RVA: 0x000598F0 File Offset: 0x00057AF0
24 public bool GetNextMessage([Out] Message message)
25 {
27 bool flag;
28 return flag;
29 }
30
31 // Token: 0x06001266 RID: 4710 RVA: 0x00059908 File Offset: 0x00057B08
32 protected static bool SendMessagesBlocking(NetworkStream stream, byte[][] messages)
33 {
35 long num = 0L;
36 if (num == 0L)
37 {
38 }
39 if (num == 0L || num == 0L)
40 {
41 }
43 if (activeReadWriteTask2 == null)
44 {
45 }
47 if (activeReadWriteTask2.m_action == null)
48 {
49 return;
50 }
51 }
52
53 // Token: 0x06001267 RID: 4711 RVA: 0x00059954 File Offset: 0x00057B54
54 protected static bool ReadMessageBlocking(NetworkStream stream, int MaxMessageSize, [Out] byte[] content)
55 {
56 if (!true)
57 {
58 }
59 string text2;
60 string text = "ReadMessageBlocking: possible allocation attack with a header of: " + text2 + " bytes.";
61 bool flag;
62 return flag;
63 }
64
65 // Token: 0x06001268 RID: 4712 RVA: 0x00059980 File Offset: 0x00057B80
66 protected static void ReceiveLoop(int connectionId, TcpClient client, ConcurrentQueue<Message> receiveQueue, int MaxMessageSize)
67 {
68 NetworkStream stream = client.GetStream();
70 if (42170256 == 0)
71 {
72 }
73 double totalSeconds = (DateTime.Now - now).TotalSeconds;
74 if (42170256 == 0)
75 {
76 }
77 int num;
78 string text = num.ToString();
79 string text2 = "ReceiveLoop: messageQueue is getting big(" + text + "), try calling GetNextMessage more often. You can call it more than once per frame!";
80 if (42170256 == 0)
81 {
82 }
84 }
85
86 // Token: 0x06001269 RID: 4713 RVA: 0x00059A10 File Offset: 0x00057C10
87 protected static void SendLoop(int connectionId, TcpClient client, SafeQueue<byte[]> sendQueue, ManualResetEvent sendPending)
88 {
89 int num = 1;
90 NetworkStream stream = client.GetStream();
91 bool connected = client.Connected;
92 bool flag = sendPending.Reset();
93 if (num == 0)
94 {
95 }
96 }
97
98 // Token: 0x0600126A RID: 4714 RVA: 0x00059A58 File Offset: 0x00057C58
99 protected Common()
100 {
101 }
102
103 // Token: 0x0600126B RID: 4715 RVA: 0x00059A74 File Offset: 0x00057C74
104 // Note: this type is marked as 'beforefieldinit'.
105 static Common()
106 {
107 }
108
109 // Token: 0x040021F7 RID: 8695
111
112 // Token: 0x040021F8 RID: 8696
113 public static int messageQueueSizeWarning;
114
115 // Token: 0x040021F9 RID: 8697
116 public bool NoDelay = true;
117
118 // Token: 0x040021FA RID: 8698
119 public int MaxMessageSize;
120
121 // Token: 0x040021FB RID: 8699
122 public int SendTimeout;
123
124 // Token: 0x040021FC RID: 8700
126 private static byte[] header;
127
128 // Token: 0x040021FD RID: 8701
130 private static byte[] payload;
131 }
132}
class f__AnonymousType0<< Count > j__TPar
Stream.ReadWriteTask _activeReadWriteTask
Definition Stream.cs:594
NetworkStream GetStream()
Definition TcpClient.cs:207
static Common()
Definition Common.cs:105
static byte[] header
Definition Common.cs:126
static bool SendMessagesBlocking(NetworkStream stream, byte[][] messages)
Definition Common.cs:32
static int messageQueueSizeWarning
Definition Common.cs:113
int ReceiveQueueCount
Definition Common.cs:16
bool GetNextMessage([Out] Message message)
Definition Common.cs:24
ConcurrentQueue< Message > receiveQueue
Definition Common.cs:110
static bool ReadMessageBlocking(NetworkStream stream, int MaxMessageSize, [Out] byte[] content)
Definition Common.cs:54
static void SendLoop(int connectionId, TcpClient client, SafeQueue< byte[]> sendQueue, ManualResetEvent sendPending)
Definition Common.cs:87
static byte[] payload
Definition Common.cs:130
static void ReceiveLoop(int connectionId, TcpClient client, ConcurrentQueue< Message > receiveQueue, int MaxMessageSize)
Definition Common.cs:66
static DateTime Now
Definition DateTime.cs:530