paraslash's http sender
More...
#include <netinet/in.h>
#include <sys/socket.h>
#include <regex.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <sys/un.h>
#include <netdb.h>
#include <lopsub.h>
#include "server.lsg.h"
#include "para.h"
#include "error.h"
#include "string.h"
#include "afh.h"
#include "net.h"
#include "server.h"
#include "http.h"
#include "list.h"
#include "sched.h"
#include "send.h"
#include "vss.h"
#include "close_on_fork.h"
#include "fd.h"
#include "chunk_queue.h"
|
#define | HTTP_ERR_MSG "HTTP/1.0 400 Bad Request\n" |
| Message sent to clients that do not send a valid get request. More...
|
|
◆ HTTP_ERR_MSG
#define HTTP_ERR_MSG "HTTP/1.0 400 Bad Request\n" |
Message sent to clients that do not send a valid get request.
◆ http_client_status
The possible states of a client from the server's POV.
Enumerator |
---|
HTTP_CONNECTED | We accepted the connection on the tcp socket.
|
HTTP_GOT_GET_REQUEST | Successfully received the get request.
|
HTTP_STREAMING | Connection is ready for sending audio data.
|
HTTP_INVALID_GET_REQUEST | We didn't receive a valid get request.
|
◆ http_sender
const struct sender http_sender |
Initial value:= {
.name = "http",
.init = http_send_init,
.shutdown = http_shutdown,
.pre_monitor = http_pre_monitor,
.post_monitor = http_post_monitor,
.send = http_send,
.shutdown_clients = http_shutdown_clients,
.client_cmds = {
},
.status = http_status,
}
The HTTP sender.
This is the only sender which does not FEC-encode the stream. This is not necessary because HTTP sits on top of TCP, a reliable transport which retransmits lost packets automatically. The sender employs per-client queues which queue chunks of audio data if they can not be sent immediately because the write operation would block. Most methods of the sender are implemented as wrappers for the generic functions defined in send_common.c.