Commit 9111bc2c authored by Max Kellermann's avatar Max Kellermann

output/httpd: add more API documentation about locking

parent 37b54179
...@@ -142,6 +142,8 @@ public: ...@@ -142,6 +142,8 @@ public:
/** /**
* Frees the client and removes it from the server's client list. * Frees the client and removes it from the server's client list.
*
* Caller must lock the mutex.
*/ */
void Close() noexcept; void Close() noexcept;
......
...@@ -208,10 +208,15 @@ public: ...@@ -208,10 +208,15 @@ public:
return HasClients(); return HasClients();
} }
/**
* Caller must lock the mutex.
*/
void AddClient(UniqueSocketDescriptor fd) noexcept; void AddClient(UniqueSocketDescriptor fd) noexcept;
/** /**
* Removes a client from the httpd_output.clients linked list. * Removes a client from the httpd_output.clients linked list.
*
* Caller must lock the mutex.
*/ */
void RemoveClient(HttpdClient &client) noexcept; void RemoveClient(HttpdClient &client) noexcept;
...@@ -239,10 +244,14 @@ public: ...@@ -239,10 +244,14 @@ public:
/** /**
* Broadcasts data from the encoder to all clients. * Broadcasts data from the encoder to all clients.
*
* Mutext must not be locked.
*/ */
void BroadcastFromEncoder(); void BroadcastFromEncoder();
/** /**
* Mutext must not be locked.
*
* Throws #std::runtime_error on error. * Throws #std::runtime_error on error.
*/ */
void EncodeAndPlay(const void *chunk, size_t size); void EncodeAndPlay(const void *chunk, size_t size);
...@@ -251,6 +260,9 @@ public: ...@@ -251,6 +260,9 @@ public:
size_t Play(const void *chunk, size_t size) override; size_t Play(const void *chunk, size_t size) override;
/**
* Mutext must not be locked.
*/
void CancelAllClients() noexcept; void CancelAllClients() noexcept;
void Cancel() noexcept override; void Cancel() noexcept override;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment