Statistics
| Branch: | Revision:

streamers / streaming.h @ da25233b

History | View | Annotate | Download (812 Bytes)

1 8a49328f CsabaKiraly
/*
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, int *fds, int fds_size);
14
void received_chunk(struct nodeID *from, const uint8_t *buff, int len);
15
void send_chunk();
16
struct chunk *generated_chunk(suseconds_t *delta);
17
int add_chunk(struct chunk *c);
18
struct chunkID_set *get_chunks_to_accept(struct peer *from, const struct chunkID_set *cset_off, int max_deliver, int trans_id);
19
void send_offer();
20
void send_accepted_chunks(struct peer *to, struct chunkID_set *cset_acc, int max_deliver, int trans_id);
21
void send_bmap(struct peer *to);
22
23
#endif        /* STREAMING_H */