public void CheckFileExistRequest(Connection connection, byte exchangeType, byte[] hash)
            {
                bool   exists     = FileDataExchangeUtils.CheckCache(ref exchangeType, ref hash);
                string hashString = hash.GetHexaString();

                Console.WriteLine("> CheckFileExistRequest: {0} ({1})", exchangeType, hashString);

                WorldHelper.ClientToServerProvider.CheckFileExistResponse(connection, exchangeType, hash, exists);
            }
Example #2
0
        public void CheckFileExistRequest(Connection connection, byte exchangeType, byte[] hash)
        {
            string hashString = hash.GetHexaString();

            Console.WriteLine("> CheckFileExistRequest: {0} ({1})", exchangeType, hashString);

            bool exists = FileDataExchangeUtils.CheckCache(ref exchangeType, ref hash);

            ServerManager.Instance.ServerToClientProvider.CheckFileExistResponse(connection, exchangeType, hash, exists);
        }
Example #3
0
        public void RequestFile(Connection connection, byte exchangeType, byte[] hash)
        {
            string hashString = hash.GetHexaString();

            Console.WriteLine("> RequestFile: {0} ({1})", exchangeType, hashString);

            if (FileDataExchangeUtils.CheckCache(ref exchangeType, ref hash))
            {
                byte[] fileData = FileDataExchangeUtils.GetCachedFile(ref exchangeType, ref hash);
                FileDataExchangeUtils.SendAddFileMessage(connection, ref exchangeType, ref hash, ref fileData);
            }
        }