Example #1
0
        void ReadTcpInfo()
        {
            string path = Application.dataPath + "/TCPconfig/ip_port.txt";

            Debug.Log("path " + path);
            string tempString = File.ReadAllText(path);

            string[] configString = tempString.Split(';');
            ServerIp   = configString[0];
            ServerPort = int.Parse(configString[1]);

            _ipconfiged = true;

            Debug.Log("server ip: " + ServerIp + "    server port: " + ServerPort);

            SetupTCP();

            var initPocket = new InitPocket(_connection);

            initPocket.Read();
            var authGameGuard = new AuthGameGuard(_connection)
            {
                SessionId = initPocket.SessionId
            };

            authGameGuard.Run();
            authGameGuard.Read();
        }