Statistics
| Branch: | Revision:

streamers / streaming.h @ 03de31e0

History | View | Annotate | Download (834 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, int *fds, int fds_size, int buff_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 nodeID *fromid, const struct chunkID_set *cset_off, int max_deliver, uint16_t trans_id);
19
void send_offer();
20
void send_accepted_chunks(struct nodeID *to, struct chunkID_set *cset_acc, int max_deliver, uint16_t trans_id);
21
void send_bmap(struct nodeID *to);
22

    
23
#endif        /* STREAMING_H */