trade_msg_ha.h File Reference

Chunk Delivery API - Higher Abstraction. More...

#include "chunk.h"

Go to the source code of this file.

Functions

int sendChunk (struct nodeID *to, const struct chunk *c)
 Send a Chunk to a target Peer.
int chunkDeliveryInit (struct nodeID *myID)
 Init the Chunk trading internals.

Detailed Description

Chunk Delivery API - Higher Abstraction.

The Chunk Delivery HA provides the primitives for effective chunks exchange with other peers.
This is a part of the Data Exchange Protocol which provides high level abstraction for sending chunks to a target peers.


Function Documentation

int chunkDeliveryInit ( struct nodeID *  myID  ) 

Init the Chunk trading internals.

Initialization facility.

Parameters:
myID address of this peer
Returns:
>= 0 on success, <0 on error
int sendChunk ( struct nodeID *  to,
const struct chunk c 
)

Send a Chunk to a target Peer.

Send a single Chunk to a given Peer

Parameters:
[in] to destination peer
[in] c Chunk to send
Returns:
0 on success, <0 on error
Generated on Mon Jul 12 16:16:52 2010 for GRAPES by  doxygen 1.6.3