Client: add constructor and destructor

Move code from client_new() and client_close().
This commit is contained in:
Max Kellermann
2013-01-03 23:32:05 +01:00
parent 3d5c094804
commit fc1f0eeda7
2 changed files with 55 additions and 52 deletions

View File

@@ -99,6 +99,10 @@ public:
*/
std::deque<ClientMessage> messages;
Client(struct player_control *player_control,
int fd, int uid, int num);
~Client();
gcc_pure
bool IsSubscribed(const char *channel_name) const {
return subscriptions.find(channel_name) != subscriptions.end();