mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 12:02:29 -04:00
- Implemented CRC32 map traffic through direct downloads
- replaced the findItems() call into a hand-written search (this was causing a rare bug in displaying downloads) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3318 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7a789edcbf
commit
012808ea00
17 changed files with 529 additions and 91 deletions
|
@ -111,7 +111,7 @@ class ftDataMultiplex: public ftDataRecv, public RsQueueThread
|
|||
bool sendChunkMapRequest(const std::string& peerId, const std::string& hash,bool is_client) ;
|
||||
|
||||
/* Client Send */
|
||||
bool sendCRCMapRequest(const std::string& peerId, const std::string& hash,const CompressedChunkMap& chnks) ;
|
||||
bool sendCRC32MapRequest(const std::string& peerId, const std::string& hash) ;
|
||||
|
||||
/*************** RECV INTERFACE (provides ftDataRecv) ****************/
|
||||
|
||||
|
@ -125,9 +125,9 @@ class ftDataMultiplex: public ftDataRecv, public RsQueueThread
|
|||
/// Receive a chunk map
|
||||
virtual bool recvChunkMap(const std::string& peer_id,const std::string& hash,const CompressedChunkMap& cmap,bool is_client) ;
|
||||
/// Receive a CRC map
|
||||
virtual bool recvCRCMap(const std::string& peer_id,const std::string& hash,const CRC32Map& crc_map) ;
|
||||
virtual bool recvCRC32Map(const std::string& peer_id,const std::string& hash,const CRC32Map& crc_map) ;
|
||||
/// Receive a CRC map request
|
||||
virtual bool recvCRCMapRequest(const std::string& peer_id,const std::string& hash) ;
|
||||
virtual bool recvCRC32MapRequest(const std::string& peer_id,const std::string& hash) ;
|
||||
|
||||
// Returns the chunk map from the file uploading client. Also initiates a chunk map request if this
|
||||
// map is too old. This supposes that the caller will ask again in a few seconds.
|
||||
|
@ -148,7 +148,7 @@ class ftDataMultiplex: public ftDataRecv, public RsQueueThread
|
|||
bool handleSearchRequest(const std::string& peerId, const std::string& hash);
|
||||
bool handleRecvClientChunkMapRequest(const std::string& peerId, const std::string& hash) ;
|
||||
bool handleRecvServerChunkMapRequest(const std::string& peerId, const std::string& hash) ;
|
||||
bool handleRecvCRC32MapRequest(const std::string& peerId, const std::string& hash, const CompressedChunkMap& map) ;
|
||||
bool handleRecvCRC32MapRequest(const std::string& peerId, const std::string& hash) ;
|
||||
|
||||
/* We end up doing the actual server job here */
|
||||
bool locked_handleServerRequest(ftFileProvider *provider, std::string peerId, std::string hash, uint64_t size, uint64_t offset, uint32_t chunksize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue