SingingCat 0
application
Data Structures | Typedefs | Functions | Variables
streams.c File Reference

handling of streams More...

#include "streams.h"

Go to the source code of this file.

Data Structures

struct  stbuf
 

Typedefs

typedef struct stbuf _stbuf
 

Functions

struct streamalloc_stream ()
 find a free stream struct, alloc an fd and return struct More...
 
void check_close (struct stream *stream)
 check if closing flash ist set and we received all the data up to close packet if, flush and close stream More...
 
void close_stream (int fd, int reason)
 
int count_open_streams ()
 count number of open streams More...
 
void flush (struct stream *stream)
 send remaining data to consumer (might be < packetsize!) More...
 
void print_stream_info ()
 print summary of current streams to console More...
 
int stream_associate (int fd, const struct consumerinfo *ci, byte *buf, int bufsize, int packetsize)
 associate a stream with a consumer. return 0 if ok otherwise errorcode More...
 
void stream_disable ()
 disable all stream handling More...
 
void stream_enable ()
 enable all stream handling (default) More...
 
void stream_init ()
 
void stream_loop ()
 called periodically, checks for stale streams and/or hung ones More...
 
void stream_seterror (int streamfd, const char *format,...)
 
void streamdata (struct command *com)
 called when we receive a stream data packet TODO: this is a really simplistic, memory-consumption optimized algorithm. it currently discards packets which are out-of-order and keeps requesting the next packet in order. Possible optimisations: More...
 
void streamsetup (struct command *com)
 called when we receive a stream setup packet More...
 

Variables

struct stream streams [2]
 mgmt for streams (the more ram, the more simultanous streams we can handle More...
 

Detailed Description

handling of streams

Definition in file streams.c.