public void HashDownloadFinished(ChunkHash[] hashes, int fileId, int senderId)
        {
            Owner o = new Owner();

            o.ApplicationId = senderId;
            o.FileId        = fileId;
            o.Add();
            ChunkHashModel.Add(hashes, fileId);
            SendFinishedNotification(fileId, senderId);
        }
Beispiel #2
0
        public static void SendAllHashes(int clientEp, int fileId)
        {
            List <ChunkHashModel> chmList = ChunkHashModel.GetChunksByFileId(fileId);

            foreach (ChunkHashModel chm in chmList)
            {
                SendHash(clientEp, chm.HashNumber, chm.Hash);
                Thread.Sleep(5);
            }
        }
Beispiel #3
0
 public static void ResendHash(int clientEp, int fileId, int chunkId)
 {
     SendHash(clientEp, chunkId, ChunkHashModel.GetChunkByChunkIdAndFileId(chunkId, fileId));
 }
Beispiel #4
0
 private void button1_Click(object sender, EventArgs e)
 {
     ChunkHashModel.DeleteAll();
     BazaF.Owner.DeleteAll();
     File.DeleteAll();
 }