From 1e2018ce831654f5bf649c5ae4d2e9b003c5a52e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Jan 2013 10:11:08 +0100 Subject: Client: move connection functions into the class --- src/ClientInternal.hxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/ClientInternal.hxx') diff --git a/src/ClientInternal.hxx b/src/ClientInternal.hxx index 788d90d7b..7d2edf046 100644 --- a/src/ClientInternal.hxx +++ b/src/ClientInternal.hxx @@ -112,6 +112,15 @@ public: bool IsSubscribed(const char *channel_name) const { return subscriptions.find(channel_name) != subscriptions.end(); } + + + gcc_pure + bool IsExpired() const { + return channel == nullptr; + } + + void Close(); + void SetExpired(); }; extern unsigned int client_max_connections; @@ -119,12 +128,6 @@ extern int client_timeout; extern size_t client_max_command_list_size; extern size_t client_max_output_buffer_size; -void -client_close(Client *client); - -void -client_set_expired(Client *client); - /** * Schedule an "expired" check for all clients: permanently delete * clients which have been set "expired" with client_set_expired(). -- cgit v1.2.3