mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 11:02:30 -04:00
Added Cache's to retroshare configuration.
* Completed CacheConfig serialisation. * Switched to Push Cache Mode (faster and more efficient). * Added CancelCacheTransfer() if we have duplicate HASH / CACHEID. * Store remote and local caches. * cleanup all cache directories. * Broke Cache tests :( - because of dependency of mAuthMgr/mConnMgr. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@343 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1bb4283986
commit
276a6bbd99
21 changed files with 796 additions and 352 deletions
|
@ -52,9 +52,13 @@ int main(int argc, char **argv)
|
|||
RsPeerId pid2("0x0102");
|
||||
RsPeerId pid3("0x0103");
|
||||
|
||||
CacheStrapper sc1(pid1, period);
|
||||
CacheStrapper sc2(pid2, period);
|
||||
CacheStrapper sc3(pid3, period);
|
||||
p3ConnectMgr *connMgr1 = NULL;
|
||||
p3ConnectMgr *connMgr2 = NULL;
|
||||
p3ConnectMgr *connMgr3 = NULL;
|
||||
|
||||
CacheStrapper sc1(connMgr1);
|
||||
CacheStrapper sc2(connMgr2);
|
||||
CacheStrapper sc3(connMgr3);
|
||||
CacheTransfer ctt1(&sc1);
|
||||
CacheTransfer ctt2(&sc2);
|
||||
CacheTransfer ctt3(&sc3);
|
||||
|
@ -67,15 +71,15 @@ int main(int argc, char **argv)
|
|||
|
||||
std::string nulldir = "";
|
||||
|
||||
CacheSource *csrc1 = new CacheTestSource(nulldir);
|
||||
CacheSource *csrc1 = new CacheTestSource(&sc1, nulldir);
|
||||
CacheStore *cstore1 = new CacheTestStore(&ctt1, nulldir);
|
||||
CacheId cid1(TESTID, 0);
|
||||
|
||||
CacheSource *csrc2 = new CacheTestSource(nulldir);
|
||||
CacheSource *csrc2 = new CacheTestSource(&sc2, nulldir);
|
||||
CacheStore *cstore2 = new CacheTestStore(&ctt2, nulldir);
|
||||
CacheId cid2(TESTID, 0);
|
||||
|
||||
CacheSource *csrc3 = new CacheTestSource(nulldir);
|
||||
CacheSource *csrc3 = new CacheTestSource(&sc3, nulldir);
|
||||
CacheStore *cstore3 = new CacheTestStore(&ctt3, nulldir);
|
||||
CacheId cid3(TESTID, 0);
|
||||
|
||||
|
@ -87,12 +91,6 @@ int main(int argc, char **argv)
|
|||
sc2.addCachePair(cp2);
|
||||
sc3.addCachePair(cp3);
|
||||
|
||||
|
||||
sc1.addPeerId(pid2);
|
||||
sc2.addPeerId(pid1);
|
||||
sc2.addPeerId(pid3);
|
||||
sc3.addPeerId(pid2);
|
||||
|
||||
/* add in a cache to sc2 */
|
||||
CacheData cdata;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue