|
|
Paraslash Audio Streaming |
| About News Download Documentation Development |
Data Fields | |
| const char * | name |
| void(* | init )(void) |
| char *(* | help )(void) |
| char *(* | status )(void) |
| void(* | send )(long unsigned current_chunk, const char *buf, size_t len, const char *header_buf, size_t header_len) |
| void(* | pre_monitor )(struct sched *s) |
| void(* | post_monitor )(void) |
| void(* | shutdown_clients )(void) |
| void(* | shutdown )(void) |
| int(* | client_cmds [NUM_SENDER_CMDS])(struct sender_command_data *) |
| int(* | resolve_target )(const char *, struct sender_command_data *) |
Describes one sender of para_server(1).
Each sender implements a bunch of methods which are called in server or in command handler context, or both.
| 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 dynamically allocated help text.
It will be freed by the caller.
| char*(* status) (void) |
Return current status information.
Like the help command, the result must be dynamically allocated and is freed by the caller.
| void(* send) (long unsigned current_chunk, const char *buf, size_t len, const char *header_buf, size_t header_len) |
The send-hook.
It gets called whenever para_server(1) is playing and the virtual streaming system detects that it is time to send another chunk of data. The two chunk values only differ if the stream was repositioned by the ff or jmp server subcommand.
| void(* pre_monitor) (struct sched *s) |
Ask the scheduler to monitor file descriptors.
| void(* post_monitor) (void) |
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.