paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Data Fields
sender Struct Reference

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 *)
 

Detailed Description

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.

See also
http_send.c, udp_send.c.

Field Documentation

◆ name

const char* name

The name of the sender.

◆ init

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.).

◆ help

char*(* help) (void)

Return the dynamically allocated help text.

It will be freed by the caller.

◆ status

char*(* status) (void)

Return current status information.

Like the help command, the result must be dynamically allocated and is freed by the caller.

◆ send

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.

◆ pre_monitor

void(* pre_monitor) (struct sched *s)

Ask the scheduler to monitor file descriptors.

◆ post_monitor

void(* post_monitor) (void)

Perform I/O on the file descriptors which are ready.

◆ shutdown_clients

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.

◆ shutdown

void(* shutdown) (void)

De-allocate all resources.

Only called on exit.

Referenced by vss_shutdown().

◆ client_cmds

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.

◆ resolve_target

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.


The documentation for this struct was generated from the following file: