private void ConnectServer(string host, int port)
{
mTcpClient = new TcpClient();
mTcpClient.SendTimeout = 1000;
mTcpClient.ReceiveTimeout = 1000;
mTcpClient.NoDelay = true;
try
{
mTcpClient.BeginConnect(host, port, new AsyncCallback(OnConnect), null);
}
catch (Exception e)
{
Close();
Debug.LogError(e.Message);
}
}