paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Data Fields
sender Struct Reference

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

Detailed Description

Describes one supported sender of para_server.

See also
http_send.c udp_send.c, dccp_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 help text of this sender.

The result must be dynamically allocated and is freed by the caller.

◆ status

char*(* status) (void)

Return current status info about this sender.

The result must be dynamically allocated and is freed by the caller.

◆ send

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.

◆ pre_monitor

void(* pre_monitor) (struct sched *s)

Ask the scheduler to monitor file descriptors.

◆ post_monitor

void(* post_monitor) (struct sched *s)

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)

Dellocate 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: