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

◆ Disconnect()

void Telepathy.Client.Disconnect ( )
inline

Definition at line 180 of file Client.cs.

181 {
182 while (!this._Connecting)
183 {
185 if (tcpClient != null)
186 {
187 Socket clientSocket = tcpClient.m_ClientSocket;
188 if (clientSocket != null)
189 {
190 if (!clientSocket.is_connected)
191 {
192 return;
193 }
194 continue;
195 }
196 }
197 return;
198 }
199 if (this._Connecting)
200 {
201 Thread thread = this.receiveThread;
202 if (thread != null)
203 {
204 thread.Interrupt();
205 }
207 if (thread2 != null)
208 {
210 }
212 if (tcpClient2 != null)
213 {
215 return;
216 }
217 }
218 else
219 {
221 if (tcpClient3 != null)
222 {
224 }
226 if (thread3 != null)
227 {
228 thread3.Join();
229 }
230 SafeQueue<byte[]> safeQueue = this.sendQueue;
231 if (safeQueue != null)
232 {
234 }
235 }
237 if (tcpClient4 != null)
238 {
240 return;
241 }
242 }
class f__AnonymousType0<< Count > j__TPar
virtual void Dispose(bool disposing)
Definition TcpClient.cs:237
Thread receiveThread
Definition Client.cs:294
Thread sendThread
Definition Client.cs:297
TcpClient client
Definition Client.cs:291
SafeQueue< byte[]> sendQueue
Definition Client.cs:303

References Telepathy.Client._Connecting, Telepathy.SafeQueue< T >.Clear(), Telepathy.Client.client, System.Net.Sockets.TcpClient.Close(), System.Net.Sockets.TcpClient.Dispose(), System.Threading.Thread.Interrupt(), j__TPar, System.Threading.Thread.Join(), Telepathy.Client.receiveThread, Telepathy.Client.sendQueue, and Telepathy.Client.sendThread.

Referenced by SaveSynchronisationClient.Close(), and SaveSynchronisationManager.Shutdown().