Client: eliminate client_puts(), use Client::Write() instead
This commit is contained in:
parent
3102e05da4
commit
16b260e371
@ -214,11 +214,6 @@ void
|
|||||||
client_new(EventLoop &loop, Partition &partition,
|
client_new(EventLoop &loop, Partition &partition,
|
||||||
int fd, SocketAddress address, int uid);
|
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.
|
* Write a printf-like formatted string to the client.
|
||||||
*/
|
*/
|
||||||
|
@ -40,7 +40,7 @@ Client::IdleNotify()
|
|||||||
idle_names[i]);
|
idle_names[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
client_puts(*this, "OK\n");
|
Write("OK\n");
|
||||||
|
|
||||||
TimeoutMonitor::Schedule(client_timeout);
|
TimeoutMonitor::Schedule(client_timeout);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ client_process_command_list(Client &client, bool list_ok,
|
|||||||
if (ret != CommandResult::OK || client.IsExpired())
|
if (ret != CommandResult::OK || client.IsExpired())
|
||||||
break;
|
break;
|
||||||
else if (list_ok)
|
else if (list_ok)
|
||||||
client_puts(client, "list_OK\n");
|
client.Write("list_OK\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -37,12 +37,6 @@ Client::Write(const char *data)
|
|||||||
return Write(data, strlen(data));
|
return Write(data, strlen(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
client_puts(Client &client, const char *s)
|
|
||||||
{
|
|
||||||
client.Write(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
client_vprintf(Client &client, const char *fmt, va_list args)
|
client_vprintf(Client &client, const char *fmt, va_list args)
|
||||||
{
|
{
|
||||||
|
@ -24,5 +24,5 @@
|
|||||||
void
|
void
|
||||||
command_success(Client &client)
|
command_success(Client &client)
|
||||||
{
|
{
|
||||||
client_puts(client, "OK\n");
|
client.Write("OK\n");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user