Exemplo n.º 1
0
        public override void FileRequested(string fileName, uint transferId)
        {
            Console.WriteLine("File '{0}' requested from server {1}", fileName, NetChannel.GetRemoteAddress());

            if (!Program.ClAllowUpload)
            {
                Console.WriteLine("File uploading disabled.");
                NetChannel.DenyFile(fileName, transferId);
                return;
            }

            // TODO: Check if file valid for uploading
            NetChannel.SendFile(fileName, transferId);
        }