Client: move connection functions into the class

This commit is contained in:
Max Kellermann
2013-01-15 10:11:08 +01:00
parent 3fcf17cb79
commit 1e2018ce83
11 changed files with 50 additions and 56 deletions

View File

@@ -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().