Implementing protobuf objects for bitswap messages

This commit is contained in:
jmjatlanta 2017-07-20 15:03:49 -05:00
parent 1fe5be1c5c
commit 2232d03854
17 changed files with 934 additions and 21 deletions

View file

@ -15,13 +15,10 @@ struct Block {
};
/***
* Create a new block based on the incoming data.
* @param data the data to base the block on
* @param data_size the length of the data array
* @param block a pointer to the struct Block that will be created
* @returns true(1) on success
* Create a new block
* @returns a new allocated Block struct
*/
int ipfs_blocks_block_new(struct Block** block);
struct Block* ipfs_blocks_block_new();
int ipfs_blocks_block_add_data(const unsigned char* data, size_t data_size, struct Block* block);