Client: eliminate client_puts(), use Client::Write() instead

This commit is contained in:
Max Kellermann 2017-02-03 20:46:53 +01:00
parent 3102e05da4
commit 16b260e371
5 changed files with 3 additions and 14 deletions

View File

@ -214,11 +214,6 @@ void
client_new(EventLoop &loop, Partition &partition,
int fd, SocketAddress address, int uid);
/**
* Write a C string to the client.
*/
void client_puts(Client &client, const char *s);
/**
* Write a printf-like formatted string to the client.
*/

View File

@ -40,7 +40,7 @@ Client::IdleNotify()
idle_names[i]);
}
client_puts(*this, "OK\n");
Write("OK\n");
TimeoutMonitor::Schedule(client_timeout);
}

View File

@ -44,7 +44,7 @@ client_process_command_list(Client &client, bool list_ok,
if (ret != CommandResult::OK || client.IsExpired())
break;
else if (list_ok)
client_puts(client, "list_OK\n");
client.Write("list_OK\n");
}
return ret;

View File

@ -37,12 +37,6 @@ Client::Write(const char *data)
return Write(data, strlen(data));
}
void
client_puts(Client &client, const char *s)
{
client.Write(s);
}
void
client_vprintf(Client &client, const char *fmt, va_list args)
{

View File

@ -24,5 +24,5 @@
void
command_success(Client &client)
{
client_puts(client, "OK\n");
client.Write("OK\n");
}