X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=udpinput.cpp;h=8659141b2ed0e11d8be8e93ae1d0b74c3867da86;hp=ae4f288e34fc16da66470f656f6ef369f3322be3;hb=3b8ad87137cff7522ed12f4675d5ff26933bc94a;hpb=4075cd5b3568e68b28c60019ad137b34445c0cf3 diff --git a/udpinput.cpp b/udpinput.cpp index ae4f288..8659141 100644 --- a/udpinput.cpp +++ b/udpinput.cpp @@ -66,14 +66,17 @@ void UDPInput::close_socket() void UDPInput::construct_header() { - string header = + http_header = "HTTP/1.0 200 OK\r\n" "Content-type: application/octet-stream\r\n" "Cache-control: no-cache\r\n" "Server: " SERVER_IDENTIFICATION "\r\n"; - for (size_t i = 0; i < stream_ids.size(); ++i) { - servers->set_header(stream_ids[i], header, ""); - } +} + +void UDPInput::add_destination(const string &stream_id) +{ + stream_ids.push_back(stream_id); + servers->set_header(stream_id, http_header, ""); } void UDPInput::do_work()