refactoring + beginning of file transfer

Now attempting to use kademlia to find a hash, and NodeIO to transfer
the file
This commit is contained in:
John Jones 2017-03-19 07:47:19 -05:00
parent 93c4988f90
commit e8b8d06f24
20 changed files with 357 additions and 90 deletions

View file

@ -178,6 +178,10 @@ int ipfs_import_print_node_results(const struct Node* node, const char* file_nam
/**
* Creates a node based on an incoming file or directory
* NOTE: this can be called recursively for directories
* NOTE: When this function completes, parent_node will be either:
* 1) the complete file, in the case of a small file (<256k-ish)
* 2) a node with links to the various pieces of a large file
* 3) a node with links to files and directories if 'fileName' is a directory
* @param root_dir the directory for where to look for the file
* @param file_name the file (or directory) to import
* @param parent_node the root node (has links to others in case this is a large file and is split)