X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=client.h;h=954ad41967878b123ea388fe9110f7d6b4069603;hp=4e8003110b11c04e20b5a713f44b75cff294133a;hb=207ca0494024641f27537ad3cf047814d8092678;hpb=8d15ccbfc46a7f0b96a47109d8f8f2495082b8f6 diff --git a/client.h b/client.h index 4e80031..954ad41 100644 --- a/client.h +++ b/client.h @@ -11,10 +11,13 @@ class ClientProto; struct Stream; // Digested statistics for writing to logs etc. +// Note that "referer" and "user_agent" here are already escaped for scary characters. struct ClientStats { std::string url; int sock; std::string remote_addr; + std::string referer; + std::string user_agent; timespec connect_time; size_t bytes_sent; size_t bytes_lost; @@ -38,6 +41,8 @@ struct Client { // Some information only used for logging. std::string remote_addr; + std::string referer; + std::string user_agent; enum State { READING_REQUEST, SENDING_HEADER, SENDING_DATA, SENDING_ERROR, WAITING_FOR_KEYFRAME, PREBUFFERING }; State state;