Statistics
| Branch: | Revision:

streamers / streaming.h @ c9370421

History | View | Annotate | Download (812 Bytes)

1 7f591208 Csaba Kiraly
/*
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 2abd0645 Luca Abeni
#ifndef STREAMING_H
8
#define STREAMING_H
9
10 30a6e902 Csaba Kiraly
#include <stdbool.h>
11
12 6920fdab Luca
void stream_init(int size, struct nodeID *myID);
13 c9370421 CsabaKiraly
int source_init(const char *fname, struct nodeID *myID, bool loop, int *fds, int fds_size);
14 74a5d4ae CsabaKiraly
void received_chunk(struct nodeID *from, const uint8_t *buff, int len);
15 fcb5c29b Csaba Kiraly
void send_chunk();
16 685225b2 CsabaKiraly
struct chunk *generated_chunk(suseconds_t *delta);
17
int add_chunk(struct chunk *c);
18 b5a5780a Csaba Kiraly
struct chunkID_set *get_chunks_to_accept(struct peer *from, const struct chunkID_set *cset_off, int max_deliver, int trans_id);
19 fcb5c29b Csaba Kiraly
void send_offer();
20 b5a5780a Csaba Kiraly
void send_accepted_chunks(struct peer *to, struct chunkID_set *cset_acc, int max_deliver, int trans_id);
21 f0cd4a0a Csaba Kiraly
void send_bmap(struct peer *to);
22 2abd0645 Luca Abeni
23
#endif        /* STREAMING_H */