output/httpd: add more API documentation about locking

This commit is contained in:
Max Kellermann 2019-04-03 22:49:25 +02:00
parent 37b54179d8
commit 9111bc2c21
2 changed files with 14 additions and 0 deletions

View File

@ -142,6 +142,8 @@ public:
/**
* Frees the client and removes it from the server's client list.
*
* Caller must lock the mutex.
*/
void Close() noexcept;

View File

@ -208,10 +208,15 @@ public:
return HasClients();
}
/**
* Caller must lock the mutex.
*/
void AddClient(UniqueSocketDescriptor fd) noexcept;
/**
* Removes a client from the httpd_output.clients linked list.
*
* Caller must lock the mutex.
*/
void RemoveClient(HttpdClient &client) noexcept;
@ -239,10 +244,14 @@ public:
/**
* Broadcasts data from the encoder to all clients.
*
* Mutext must not be locked.
*/
void BroadcastFromEncoder();
/**
* Mutext must not be locked.
*
* Throws #std::runtime_error on error.
*/
void EncodeAndPlay(const void *chunk, size_t size);
@ -251,6 +260,9 @@ public:
size_t Play(const void *chunk, size_t size) override;
/**
* Mutext must not be locked.
*/
void CancelAllClients() noexcept;
void Cancel() noexcept override;