Changeset 645
- Timestamp:
- 03/19/07 14:26:36 (17 months ago)
- Location:
- branches/newnet/museekd/museekd
- Files:
-
- 1 added
- 3 modified
-
downloadmanager.cpp (modified) (2 diffs)
-
downloadmanager.h (modified) (1 diff)
-
downloadsocket.h (added)
-
main.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/newnet/museekd/museekd/downloadmanager.cpp
r634 r645 22 22 #include "peersocket.h" 23 23 #include "servermanager.h" 24 #include "downloadsocket.h" 24 25 #include <NewNet/nnreactor.h> 25 26 … … 252 253 { 253 254 // Transfer can start immediately, no queue at remote end. 254 NNLOG("museek.debug", "Got transfer reply: user=%s,path=%s,ticket=%u,allowed=yes,filesize=%llu", user.c_str(), download->path.c_str(), download->ticket, message->filesize); 255 NNLOG("museek.debug", "Ehm.. We're supposed to do something here: connect to %s and claim our prize...", user.c_str()); 255 NNLOG("museek.debug", "Got transfer reply: user=%s,path=%s,ticket=%u,allowed=yes,filesize=%llu. Initiating download.", user.c_str(), download->path.c_str(), download->ticket, message->filesize); 256 download->size = message->filesize; 257 m_Museekd->reactor()->add(new DownloadSocket(m_Museekd, download)); 256 258 } 257 259 else -
branches/newnet/museekd/museekd/downloadmanager.h
r634 r645 50 50 uint ticket; // The download ticket with which this download is identified 51 51 std::string user, path, localPath; 52 off_t size; 52 53 TrState state; // Transfer state (see mutypes.h) 53 54 std::string error; // Error message if state = TR_Error -
branches/newnet/museekd/museekd/main.cpp
r643 r645 115 115 museekd->reactor()->addTimeout(5000, new AutoConnectCallback); 116 116 117 /* Add a sample download. */ 118 museekd->downloads()->add("hyriand", "\\home\\hyriand\\MyBook\\music\\data"); 119 117 120 /* Start the reactor. This drives the daemon. */ 118 121 museekd->reactor()->run();
