]> git.sesse.net Git - cubemap/blobdiff - udpinput.cpp
Send backlog file descriptors around instead of going through the protobuf. Much...
[cubemap] / udpinput.cpp
index bd83381b563dc9b897b70f8d89b66a39a3da0ef1..8659141b2ed0e11d8be8e93ae1d0b74c3867da86 100644 (file)
@@ -66,15 +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"
-               "\r\n";
-       for (size_t i = 0; i < stream_ids.size(); ++i) {
-               servers->set_header(stream_ids[i], header);
-       }
+               "Server: " SERVER_IDENTIFICATION "\r\n";
+}
+       
+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()