Statistics
| Branch: | Revision:

streamers / streaming.h @ 74a5d4ae

History | View | Annotate | Download (746 Bytes)

1
/*
2
 *  Copyright (c) 2010 Luca Abeni
3
 *  Copyright (c) 2010 Csaba Kiraly
4
 *
5
 *  This is free software; see gpl-3.0.txt
6
 */
7
#ifndef STREAMING_H
8
#define STREAMING_H
9

    
10
#include <stdbool.h>
11

    
12
void stream_init(int size, struct nodeID *myID);
13
int source_init(const char *fname, struct nodeID *myID, bool loop);
14
void received_chunk(struct nodeID *from, const uint8_t *buff, int len);
15
void send_chunk();
16
int generated_chunk(suseconds_t *delta);
17
struct chunkID_set *get_chunks_to_accept(struct peer *from, const struct chunkID_set *cset_off, int max_deliver, int trans_id);
18
void send_offer();
19
void send_accepted_chunks(struct peer *to, struct chunkID_set *cset_acc, int max_deliver, int trans_id);
20
void send_bmap(struct peer *to);
21

    
22
#endif        /* STREAMING_H */