ServerSocket: replace callback with virtual method
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "output_internal.h"
|
||||
#include "timer.h"
|
||||
#include "thread/Mutex.hxx"
|
||||
#include "event/ServerSocket.hxx"
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
@@ -39,7 +40,7 @@ class ServerSocket;
|
||||
class HttpdClient;
|
||||
class Page;
|
||||
|
||||
struct HttpdOutput {
|
||||
struct HttpdOutput final : private ServerSocket {
|
||||
struct audio_output base;
|
||||
|
||||
/**
|
||||
@@ -78,11 +79,6 @@ struct HttpdOutput {
|
||||
*/
|
||||
struct timer *timer;
|
||||
|
||||
/**
|
||||
* The listener socket.
|
||||
*/
|
||||
ServerSocket *server_socket;
|
||||
|
||||
/**
|
||||
* The header page, which is sent to every client on connect.
|
||||
*/
|
||||
@@ -201,6 +197,10 @@ struct HttpdOutput {
|
||||
bool EncodeAndPlay(const void *chunk, size_t size, GError **error_r);
|
||||
|
||||
void SendTag(const struct tag *tag);
|
||||
|
||||
private:
|
||||
virtual void OnAccept(int fd, const sockaddr &address,
|
||||
size_t address_length, int uid) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user