Version 1.2.0.3.1

Decompiled with IlSpy
Fixes Source Code
This commit is contained in:
TheVamp 2013-10-12 11:25:17 +02:00
parent fd93a0ee5e
commit 0462173018
38 changed files with 243391 additions and 0 deletions

53
Terraria/ClientSock.cs Normal file
View file

@ -0,0 +1,53 @@
using System;
using System.Net.Sockets;
namespace Terraria
{
public class ClientSock
{
public TcpClient tcpClient = new TcpClient();
public NetworkStream networkStream;
public string statusText;
public int statusCount;
public int statusMax;
public int timeOut;
public byte[] readBuffer;
public byte[] writeBuffer;
public bool active;
public bool locked;
public int state;
public void ClientWriteCallBack(IAsyncResult ar)
{
NetMessage.buffer[256].spamCount--;
}
public void ClientReadCallBack(IAsyncResult ar)
{
if (!Netplay.disconnect)
{
int num = this.networkStream.EndRead(ar);
if (num == 0)
{
Netplay.disconnect = true;
Main.statusText = "Lost connection";
}
else
{
if (Main.ignoreErrors)
{
try
{
NetMessage.RecieveBytes(this.readBuffer, num, 256);
goto IL_59;
}
catch
{
goto IL_59;
}
}
NetMessage.RecieveBytes(this.readBuffer, num, 256);
}
}
IL_59:
this.locked = false;
}
}
}