Exemple #1
0
        public void RequestFileState(int ep, int fileId)
        {
            FileStateMessageProvider fsmp = new FileStateMessageProvider(SocketResourcesManager.srm.ProvideBuffer());
            OutputMessage            msg  = fsmp.ProvideRequestFileStateMessage(fileId);

            ClientCommunicationCenter.commCenter.SendMessageTo(ep, msg);
        }
Exemple #2
0
        public void FileStateRequested(int ep, int fileId)
        {
            FileState fs = FileTransferCenter.ftc.GetFs(fileId);

            if (fs != null)
            {
                byte[] chunksState            = fs.GetChunksState();
                FileStateMessageProvider fsmp = new FileStateMessageProvider(SocketResourcesManager.srm.ProvideBuffer());
                OutputMessage            msg  = fsmp.ProvideResponseFileStateMessage(fileId, chunksState);
                ClientCommunicationCenter.commCenter.SendMessageTo(ep, msg);
            }
        }