]> git.sesse.net Git - cubemap/blobdiff - serverpool.cpp
Rename ping to gen204, and change the response type to a 204 No Response, since that...
[cubemap] / serverpool.cpp
index a834e8c539eec3fadc0abbea91b7188a7da1b263..c77c30ef85c262084a0d92ad862da38a4717ceb5 100644 (file)
@@ -67,7 +67,7 @@ void ServerPool::add_client_from_serialized(const ClientProto &client)
        servers[clients_added++ % num_servers].add_client_from_serialized(client);
 }
 
-int ServerPool::lookup_stream_by_url(const std::string &url) const
+int ServerPool::lookup_stream_by_url(const string &url) const
 {
        assert(servers != NULL);
        return servers[0].lookup_stream_by_url(url);
@@ -163,6 +163,13 @@ void ServerPool::add_data(int stream_index, const char *data, size_t bytes, Stre
        }
 }
 
+void ServerPool::add_gen204(const std::string &url, const std::string &allow_origin)
+{
+       for (int i = 0; i < num_servers; ++i) {
+               servers[i].add_gen204(url, allow_origin);
+       }
+}
+
 void ServerPool::run()
 {
        for (int i = 0; i < num_servers; ++i) {