c-ipfs/exchange/bitswap/network.c

37 lines
846 B
C
Raw Normal View History

2017-07-20 12:57:20 +00:00
/***
* This implements the BitswapNetwork. Members of this network can fill requests and
* smartly handle queues of local and remote requests.
2017-07-24 19:56:30 +00:00
*
* For a somewhat accurate diagram of how this may work, @see https://github.com/ipfs/js-ipfs-bitswap
2017-07-20 12:57:20 +00:00
*/
#include "ipfs/exchange/bitswap/network.h"
2017-07-20 12:57:20 +00:00
2017-07-24 19:56:30 +00:00
/***
* The main loop
*/
2017-07-20 12:57:20 +00:00
2017-07-24 19:56:30 +00:00
/**
* We received a BitswapMessage from the network
*/
/*
ipfs_bitswap_network_receive_message(struct BitswapContext* context) {
}
*/
2017-07-24 19:56:30 +00:00
/**
* We want to pop something off the queue
2017-07-24 19:56:30 +00:00
*/
2017-07-31 11:43:15 +00:00
/****
* send a message to a particular peer
* @param context the BitswapContext
* @param peer the peer that is the recipient
* @param message the message to send
*/
int ipfs_bitswap_network_send_message(const struct BitswapContext* context, const struct Libp2pPeer* peer, const struct BitswapMessage* message) {
return 0;
}