public static void TcpClientLoop(object threadContext)
{
Netplay.ClientLoopSetup((RemoteAddress) new TcpAddress(Netplay.ServerIP, Netplay.ListenPort));
Main.menuMode = 14;
bool flag = true;
while (flag)
{
flag = false;
try
{
Netplay.Connection.Socket.Connect((RemoteAddress) new TcpAddress(Netplay.ServerIP, Netplay.ListenPort));
flag = false;
}
catch
{
if (!Netplay.disconnect)
{
if (Main.gameMenu)
{
flag = true;
}
}
}
}
Netplay.InnerClientLoop();
}