Paraslash Audio Streaming | |
About News Download Documentation Development |
Describes one supported sender of para_server. More...
#include <send.h>
Data Fields | |
const char * | name |
The name of the sender. More... | |
void(* | init )(void) |
Parse the command line options and initialize this sender (e.g., initialize target or access control lists, listen on a network socket, etc.). More... | |
char *(* | help )(void) |
Return the help text of this sender. More... | |
char *(* | status )(void) |
Return current status info about this sender. More... | |
void(* | send )(long unsigned current_chunk, long unsigned chunks_sent, const char *buf, size_t len, const char *header_buf, size_t header_len) |
The send-hook. More... | |
void(* | pre_monitor )(struct sched *s) |
Ask the scheduler to monitor file descriptors. More... | |
void(* | post_monitor )(struct sched *s) |
Perform I/O on the file descriptors which are ready. More... | |
void(* | shutdown_clients )(void) |
Terminate all connected clients. More... | |
void(* | shutdown )(void) |
Dellocate all resources. More... | |
int(* | client_cmds [NUM_SENDER_CMDS])(struct sender_command_data *) |
Array of function pointers for the sender subcommands. More... | |
int(* | resolve_target )(const char *, struct sender_command_data *) |
Resolve target-specific URL string. More... | |
Describes one supported sender of para_server.
const char* name |
The name of the sender.
void(* init) (void) |
Parse the command line options and initialize this sender (e.g., initialize target or access control lists, listen on a network socket, etc.).
char*(* help) (void) |
Return the help text of this sender.
The result must be dynamically allocated and is freed by the caller.
char*(* status) (void) |
Return current status info about this sender.
The result must be dynamically allocated and is freed by the caller.
void(* send) (long unsigned current_chunk, long unsigned chunks_sent, const char *buf, size_t len, const char *header_buf, size_t header_len) |
The send-hook.
It gets called whenever para_server is playing and the current audio format handler indicates that another chunk of data should be sent now. The two parameters current_chunk and chunks_sent only differ if the stream was repositioned by the ff or jmp command. Of course, buf is a pointer to the chunk of data which should be sent, and len is the length of this buffer.
void(* pre_monitor) (struct sched *s) |
Ask the scheduler to monitor file descriptors.
void(* post_monitor) (struct sched *s) |
Perform I/O on the file descriptors which are ready.
void(* shutdown_clients) (void) |
Terminate all connected clients.
This is called e.g. if the stop command was executed. It should make the clients aware of the end-of-file condition.
void(* shutdown) (void) |
int(* client_cmds[NUM_SENDER_CMDS])(struct sender_command_data *) |
Array of function pointers for the sender subcommands.
Each sender may implement any subset of the sender commands by filling in the appropriate function pointer in the array. A NULL
pointer means this command is not implemented by this sender.
int(* resolve_target) (const char *, struct sender_command_data *) |
Resolve target-specific URL string.
This method must be defined if the sender supports the add/delete subcommands. It interprets a string specifying a target URL in a sender-specific fashion (e.g. embedded FEC string). It can also fill in sender-specific defaults if necessary.