Ejemplo n.º 1
0
 public void Disconnect()
 {
     if (mNetwork != null)
     {
         mNetwork.Disconnect();
     }
     mNetwork = null;
 }
Ejemplo n.º 2
0
        public void ConnectServer(ServerType type, string address)
        {
            mServerType = type;
            switch (type)
            {
            case ServerType.Login:
                mNetwork = HttpNetwork.NewObject(address);
                break;

            case ServerType.Game:
                string[] svrIp = address.Split(':');
                mNetwork = SocketNetwork.NewObject(svrIp[0], Convert.ToInt32(svrIp[1]));
                break;

            default:
                mServerType = ServerType.None;
                break;
            }
        }